I want to draw a line on y=0. However, I am not sure how to do that using pandas built-in charting.
df.mean(axis=1).plot() I am running this and that is the result.
CodePudding user response:
Catch the ax instance returned by plot, and you can use axhline:
ax = df.mean(axis=1).plot()
ax.axhline(0, c='r')
Output:


