You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and then want to add a line through matplotlib using the index or datetime64 values, this does not work (it plots the data at a totally wrong place outside of sight in this case):
ax.plot(s.index, s.values, color='g')
# or
ax.plot(s.index.values, s.values, color='r')
This is because PeriodConverter cannot deal with datetime64 values (Period/PeriodIndex also cannot deal with them), while when plotting this through the pandas plot interface, the datetime64 values will first be converted to periods.