Tell us what’s happening:
I am trying to visualize the data as a barplot in the second question, but it keeps coming out as an empty barplot, I have tried to use a dark grid but the data does not show up even though the code runs without error.
Your code so far
def draw_bar_plot(): #Copy and modify data for monthly bar plot
df_bar = df
df_bar[[‘date’, ‘month’, ‘day’]] = df_bar[‘date’].str.split(‘-’, expand=True)
df_two = df_bar.rename({‘date’:‘year’}, axis=1)
df_three = df_two.groupby([‘year’, ‘month’])[‘value’].mean().reset_index()
df_three.columns = [‘year’, ‘month’, ‘mean’]
labels = [‘January’, ‘February’, ‘March’, ‘April’, ‘May’, ‘June’, ‘July’, ‘August’, ‘September’, ‘October’, ‘November’, ‘December’]
Hi, I am using matplotlib and getting a graph, but am unable to make the bars different colors based on month if I do not use seaborn, and seaborn results in the same errors I experience in the initial post. Any help would be appreciated. Code is linked below