Question: new _ df = df . groupby ( ' Recession ' ) [ ' Automobile _ Sales' ] . mean ( ) . reset _

new_df = df.groupby('Recession')['Automobile_Sales'].mean().reset_index()
# Create the bar chart using seaborn
plt.figure(figsize=(..........,............)
sns.barplot(x='Recession', y='Automobile_Sales', hue='Recession', data=new_df)
plt.xlabel('............')
plt.ylabel('...............')
plt.title('Average Automobile Sales during Recession and Non-Recession')
plt.xticks(ticks=[0,1], labels=['Non-Recession', 'Recession'])
plt.show()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!