I have a dataframe that looks like this:
Floor IDR 1 IDR 2 1 1 15 36 2 2 6 12 3 3 7 78 4 4 9 23
And I want to plot this dataframe as a line chart where y-axis is the floor. I have read the documentation on df.plot() method and it seem you can input more than one columns of data into y kwarg but not to the x.
So I have been reseaching to find a solution and I came across this question that resemles the most to my problem:
Plotting multiple columns in a pandas line graph
I have this code:
df.plot(kind="line", y=["IDR 1", "IDR 2"], x="Floor", grid=True, xlabel="Floor", ylabel=data)
Basicly I just want to swap the axises.
Hür Doğan ÜNLÜ is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.