Generation

generate functionSat, 28 Jan 2023

There is a Pandas dataframe: hotels_rev = df1[['date', 'hotel', 'revenue', 'av_revenue', 'difference', 'in_percent']].sort_values(by=['hotel', 'date']) Construct a bar graph with 'hotel' values in the x axis and change values in the 'date' column and 'av_revenue' values in the y axis

hotels_rev = df1[['date', 'hotel', 'revenue', 'av_revenue', 'difference', 'in_percent']].sort_values(by=['hotel', 'date']) hotels_rev %matplotlib inline hotels_rev['hotel'].value_counts() hotels_rev.plot('hotel', 'av_revenue', kind = 'bar')

Questions about programming?Chat with your personal AI assistant