-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Milestone
Description
rng = pd.date_range('1/1/2012', periods=4, freq=pd.offsets.YearEnd())
s = pd.Series(np.random.randn(4), index=rng)
s.resample(rule=pd.offsets.Week(weekday=0), fill_method="pad", closed="left", kind="period")
leads to:
...
/usr/local/lib/python2.7/dist-packages/pandas/tseries/period.pyc in _from_arraylike(cls, data, freq, tz)
652 'inferred from first element'))
653
--> 654 if np.issubdtype(data.dtype, np.datetime64):
655 data = dt64arr_to_periodarr(data, freq, tz)
656 elif data.dtype == np.int64:
/usr/local/lib/python2.7/dist-packages/numpy/core/numerictypes.pyc in issubdtype(arg1, arg2)
757
758 """
--> 759 if issubclass_(arg2, generic):
760 return issubclass(dtype(arg1).type, arg2)
761 mro = dtype(arg2).type.mro()
/usr/local/lib/python2.7/dist-packages/numpy/core/numerictypes.pyc in issubclass_(arg1, arg2)
697 """
698 try:
--> 699 return issubclass(arg1, arg2)
700 except TypeError:
701 return False
Setting kind="period"
seems to trigger the issue.
Metadata
Metadata
Assignees
Labels
No labels