函数DataFrame.apply()有问题
我需要获取row作为参数,但它在每个调用中分别获取每行的元素
data frame here
def parser(row):
feature1 = row['feature1']
"""
do some computations with feature1
"""
feature = answer_from_previous_steps
label = row['label']
return [feature, label]
temp = df.apply(parser, axis=1)
Tags:
问题解决了。由于代码中有错误的日志,我很困惑
相关问题 更多 >
编程相关推荐