我想把给定的观察值转换成log10。你知道吗
我只想计算HR90和左边的字段的log10。我试图只选择正确的列,但我得到错误的所有时间,我瘦我的代码太复杂了,这一点。你知道吗
这是我的密码:
for i[9:] in data.columns:
np.log10(data)
AttributeError:“str”对象没有属性“log10”
似乎它还抓取了我不想在其上运行此进程的列。 我还尝试导入数学,然后:
import math
for i in data.columns:
if(data[i].dtype == np.float64 or data[i].dtype == np.int64):
data.applymap(math.log10)
但是我得到了:
TypeError: ('must be real number, not str', 'occurred at index NAME')
我的最终目标是将我的部分观察结果转换成LOG10
你是说这样的事吗?你知道吗
这也会给你同样的:
简单点怎么样
对于索引为0到索引为8(含)的所有列,这将使用log10。你知道吗
如果列左移或等于“HR90”,则可以使用get_loc应用对数映射。你知道吗
相关问题 更多 >
编程相关推荐