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
After using the asfreq method to change the frequency of a time-series DataFrame from None to something e.g. 15Min the cursor position in matplotlib graphs of that DataFrame is no longer correct (usually shows a datetime just after the unix epoch). The following demonstrates this (NB dt in df1 is not a constant):
df1 = pandas.read_csv('tseries1.csv', names=['tstamp', 'Q'], parse_dates=True,
index_col='tstamp').clip_lower(0).fillna(0)
df1['T'] = pandas.read_csv('tseries2.csv', names=['tstamp', 'T'], parse_dates=True,
index_col='tstamp', squeeze=True).clip_lower(0).fillna(0)
df2 = df1.asfreq(freq='15Min', method='ffill')
# NB df1.index.freq is None
# NB df2.index.freq is <15 * Minutes>
df1.plot()
df2.plot()
plt.show()
I find the Matplotlib cursor position to be invaluable when looking for features in very long time-series.
After using the
asfreq
method to change the frequency of a time-series DataFrame fromNone
to something e.g.15Min
the cursor position in matplotlib graphs of that DataFrame is no longer correct (usually shows a datetime just after the unix epoch). The following demonstrates this (NB dt in df1 is not a constant):I find the Matplotlib cursor position to be invaluable when looking for features in very long time-series.
Versions:
The text was updated successfully, but these errors were encountered: