Created
April 12, 2023 15:13
-
-
Save srang992/d1d1ba99f1250c5b6322b5cc156c2e45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# defining a dictionary for renaming the columns | |
column_names = {"ref": "reference_no", | |
"Company (Manufacturer)": "manufacturer", | |
"Company Location": "company_loc", | |
"Review Date": "review_date", | |
"Country of Bean Origin": "bean_origin", | |
"Specific Bean Origin or Bar Name": "bar_name", | |
"Cocoa Percent": "cocoa_percent", | |
"Ingredients": "ingredients", | |
"Most Memorable Characteristics": "taste", | |
"Rating": "rating"} | |
# renaming the columns and displaying the first 5 rows of the data | |
choco_data.rename(columns=column_names, inplace=True) | |
choco_data.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment