Resampler: IPython 5.0 triggers wrong FutureWarning · Issue #13618 · pandas-dev/pandas (original) (raw)
With the latest IPython:
In [1]: rng = pd.date_range('20130101', periods=10, freq='T')
...: ts = pd.Series(np.arange(len(rng)), index=rng)
In [3]: r = ts.resample('2T')
In [4]: r
Out[4]: c:\users\vdbosscj\scipy\ipython-joris\IPython\utils\dir2.py:65: FutureWa
rning: .resample() is now a deferred operation
use .resample(...).mean() instead of .resample(...)
canary = getattr(obj, '_ipython_canary_method_should_not_exist_', None)
DatetimeIndexResampler [freq=<2 * Minutes>, axis=0, closed=left, label=left, con
vention=start, base=0]
In [5]: import IPython
In [6]: IPython.__version__
Out[6]: '5.0.0'
In [7]: pd.__version__
Out[7]: '0.18.1+184.g15c2a3a'
while using IPython 4.2:
In [1]: rng = pd.date_range('20130101', periods=10, freq='T')
In [2]: ts = pd.Series(np.arange(len(rng)), index=rng)
In [3]: r = ts.resample('2T')
In [4]: r
Out[4]: DatetimeIndexResampler [freq=<2 * Minutes>, axis=0, closed=left, label=l
eft, convention=start, base=0]
In [5]: import IPython
In [6]: IPython.__version__
Out[6]: '4.2.0'
In [7]: pd.__version__
Out[7]: '0.18.1+184.g15c2a3a'