I have a column with the following values:
City
A
B
C
I want to create a heatmap but can't because this column is not an integar so I will be making it as follows:
city_new
1
2
3
I have tried this case statement but it does not work
df['city_new'] = np.where(df['City']='A', 1,
np.where(df['City']='B', 2,
np.where(df['City']='C', 3)))