变异不适用于Pandas。到现在为止

2024-04-20 07:00:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个数据帧

hub2['time'] = pd.to_datetime(hub2.timestamp)

很有用,但是当我写作的时候

{cd2}

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

为什么?在


Tags: to数据inpypandasdatetimereturntime