I just want a SIMPLE bar chart

I have StreamLit working fine with some simple things like st.write and even st.table.

I have a CSV file with two columns, “Date” and “Profit/Loss”

Date,Profit/Loss
2022-01-14,-500.00
df =  pd.read_csv('profitloss.csv')

chart_data = pd.DataFrame(df)

st.bar_chart(chart_data)

this code just gives me this error:

**StreamlitAPIException** : ("Expected bytes, got a 'float' object", 'Conversion failed for column value with type object')

What am I doing wrong?

Hi @TheBigDuck

I suggest you replace the above code with the following code:

Also suggest you take a look at other visualization libraries: Altair, etc.

Cheers :slight_smile:

1 Like

Works like a champ!
Thanks!