I have been trying to create a plotly line chart using columns from my dataframe the output does not create a line view.
My code is;
fig = px.line(ElectricCarData, x=âBrandâ, y=âAccelâ)
fig.show()
The output view is:
Many thanks
I have been trying to create a plotly line chart using columns from my dataframe the output does not create a line view.
My code is;
fig = px.line(ElectricCarData, x=âBrandâ, y=âAccelâ)
fig.show()
The output view is:
Many thanks
@Dashz are you sure a line chart is the most appropriate type of graph for this since your y-axis is categorical data? If thatâs really what you want maybe a connected scatter plot might do the trick.
Hi @jhupiterz,
I have just had a look at the link you have provided the issue I think for me is that I had been attempting to use it earlier for my charts but I couldnât input csv dataframe and the other issue is that in my csv there are 33 brands so there would be a lot of data to manually input x and y plot option.
Many thanks
Hi @jhupiterz,
Is there a way to change the first line to incorporate my code as I can put my df name but for the px.data.gapminder how may I substitute this?
df = px.data.gapminder().query(âcountry in [âCanadaâ, âBotswanaâ]â)
Many thanks
@Dashz so the px.data.gapminder()
is just going to fetch the gapminder dataset thatâs it.
You should remove that line completely and instead put your own data.
Hi @jhupiterz,
Thanks for your reply, I think itâs the data type issue as youâve mentioned I had removed the line above but the data view was as shown in the screenshot and so I have reverted to using a bar chart instead.
For my other questions with the datasets I might attempt an area and see if they function.
Many thanks