I have the following table:
I need to draw line charts of both dogs and cats on the same graph. When writing:
fig = px.line(df2, x='Year', y=['dogs','cats'])
I get this chart: which obviously not what I want:
How do I read those numbers as floats, and at the same time, divide the ticks to have integer values, of let's say 500, 1000, 1500, etc?
Look in your dataframe, the values of dogs and cats have "comma", hence they are being treated as string, remove them and your desired graph will be automatically created like this: