hotel_dataframe=hotel_dataframe.groupby(['hotel','meal']).size()
hotel_dataframe=hotel_dataframe.unstack()
meal_comparison=hotel_dataframe.plot(kind='bar')`
如何在Python-Jupyter笔记本中向该条形图添加标题?
您正在使用熊猫的df.plot()方法,该方法带有一个可选的title
参数,您可以将其设置为任何字符串值:
meal_comparison=hotel_dataframe.plot(kind='bar',
title='Hotel Comparisons')