text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

choco_data = pd.read_csv('/kaggle/input/chocolate-bar-ratings/chocolate_bars.csv')
choco_data2 = pd.read_csv('/kaggle/input/chocolate-bar-ratings/chocolate_bars.csv')
len(choco_data)

choco_data.sample(5)

nullValues = choco_data.isnull().sum()
nullValues[0:12]

choco_data = choco_data.drop(['num_ingredients', 'ingredients'], axis=1)

nullValues = choco_data.isnull().sum()

choco_data4 = choco_data

one_hot = pd.get_dummies(choco_data4, columns=['company_location'], drop_first=False)

choco_data_custom = ['brown', 'toblerone', 'perk', 'mars', 'mars', 'chocho', 'london', 'perk', 'brown']
print(pd.get_dummies(choco_data_custom, drop_first=True))