小编Kar*_*ika的帖子

ufunc 的到期循环中的错误不支持 str 类型的参数 0,该参数没有可调用的 log 方法

当我使用下面的日志函数时,我在 jupyter 笔记本中收到以下错误消息。data1 = np.log(mdata).diff().dropna() 我尝试进行强制转换但无法摆脱这个问题。-------------------------------------------------- ------------------------- AttributeError Traceback(最近一次调用最后) AttributeError:'str'对象没有属性'log'

The above exception was the direct cause of the following exception:

TypeError                                 Traceback (most recent call last)
<ipython-input-13-b6f1878a7619> in <module>
----> 1 data1 = np.log(mdata).diff().dropna()

TypeError: loop of ufunc does not support argument 0 of type str which has no callable log method
Run Code Online (Sandbox Code Playgroud)

元数据:

          Field1    Field2  Field3  Field4
TS              
2020-11-02 00:43:58.500 1595000 849332  205 69
2020-11-02 00:43:58.500 1408000 820332  198 51
2020-11-02 00:43:58.500 1770000 926054  213 56
2020-11-02 00:43:58.500 1760000 …
Run Code Online (Sandbox Code Playgroud)

python time-series

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

python ×1

time-series ×1