Created
April 12, 2023 16:55
-
-
Save srang992/a5be02d6da4b66ce62d65d9b5ae27255 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
# filtering the taste of Kokoa Kamili and separating the values | |
taste_encode = choco_data[choco_data['bar_name'].isin(['Kokoa Kamili'])]['taste'].str.get_dummies(sep=', ') | |
# fixing some of the values whose pronunciation is wrong | |
taste_encode['nuts'] = taste_encode['nut'] + taste_encode['nuts'] | |
taste_encode['rich_cocoa'] = taste_encode['rich'] + taste_encode['rich cocoa'] + taste_encode['rich cooa'] | |
# dropping the columns containing wrong pronunciation | |
taste_encode.drop(['nut', 'rich', 'rich cooa'], axis=1, inplace=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment