I have a Dataframe which looks as shown below

enter image description here

I am trying to make a line plot for looking at the peaks for both columns (a,b), I have gotten as far as


but the plot looks shabby, enter image description here


enter image description here

I am looking to have something like this enter image description here

Any Help is Appreciated.


1 Answer 1


You can try this

wr.reset_index().plot(x='index', y=['a', 'b'], figsize=(10,5), grid=True)
  • The reset_index() will change the index back to column
  • The x = 'index' will use the date index as the x axis
  • The y=['a','b'] will plot both columns as two time series
  • figsize just tell the plot how big to be
  • grid=True will add a grid on the plot

You will need to give some extra 'love' to your styling to make it look exactly as your example.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.