python-pandas 0.17.1-3ubuntu2 bug in functionality

Bug #1728393 reported by Asr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pandas (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The .apply() function does not work for resample function in this release.
Here a code sample to reproduce the error:
#### Code
import numpy as np
import pandas as pd
from pandas.io import sql

rng = pd.date_range('1/1/2011', periods=72, freq='30s')
df2 = pd.DataFrame(np.random.randn(72),index=rng)
x=df2.resample('60s',closed='right',convention='start')#.apply(np.median)
print x.shape
y=df2.resample('60s',closed='right',convention='start',how='median')
print y.shape
z=df2.resample('60s',closed='right',convention='start').apply(np.median)
print z.shape
print z

print('stop')
#### Output
(37, 1)
(37, 1)
(1,)
The function how='median' is deprecate and .apply(np.median)should be used. But the result array when using the apply function always consists only of one line, when running on Ubuntu Mate (16.04 LTS).
On other systems the usage of how=xxx and .apply(xxx) is equivalent.

Vlad Orlov (monsta)
affects: ubuntu-mate → pandas (Ubuntu)
Revision history for this message
Rebecca Palmer (rebecca-palmer) wrote :

Fixed in Disco (0.23.3) and probably earlier.

Changed in pandas (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.