
import pandas as pd
import plotly
import plotly.express as px
import plotly.io as pio
df = pd.read_csv("final_spreadsheet.csv")
barchart = px.bar(
data_frame = df,
x = "Post-Lockdown Period (May - September)",
y = "Post-Lockdown Period (May - September)",
color = "Peak-Lockdown Period (March-May)",
opacity = 0.9,
orientation ="v",
barmode = 'relative',
)
pio.show(barchart)
I want the x axis to be the different behavioral variables and for each behavioral variable I want there to be two bars one for peak pandemic and one for post pandemic. I also want the y axis to just be the values of each
This is my current attempt but no graphs appear. Attached is also a picture of the CSV file in excel form
