我有一个DataFrame
hub2['time'] = pd.to_datetime(hub2.timestamp)
有效,但是当我写
时 hub2 >> mutate(time=pd.to_datetime(X.timestamp))
https://github.com/kieferk/dfply 我收到了错误
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "[...]/lib/python2.7/site-packages/pandas/util/decorators.py", line 91, in wrapper
return func(*args, **kwargs)
File "[...]/lib/python2.7/site-packages/pandas/tseries/tools.py", line 419, in to_datetime
elif isinstance(arg, ABCSeries):
File "[...]/lib/python2.7/site-packages/pandas/types/generic.py", line 9, in _check
return getattr(inst, attr, '_typ') in comp
TypeError: __nonzero__ should return bool or int, returned Call
为什么?