成功解决TypeError: drop() missing 1 required positional argument: 'labels'

简介: 成功解决TypeError: drop() missing 1 required positional argument: 'labels'

解决问题


TypeError: drop() missing 1 required positional argument: 'labels'




解决思路


类型错误:drop()缺少1个必需的位置参数:“labels”





解决方法


是因为drop()函数的调用方法,必须有参数labels='某个字段',指定即可!

(1)、也可以尝试去掉drop函数直接输出!


split_cv[ predictions != cv_df.as_matrix()[:,0] ].drop()

split_cv[ predictions != cv_df.as_matrix()[:,0] ]

 


相关文章
|
1月前
|
Python
【Python】已解决:TypeError: *init*() missing 1 required positional argument: ‘scheme’
【Python】已解决:TypeError: *init*() missing 1 required positional argument: ‘scheme’
43 0
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
|
10月前
|
算法框架/工具
Keras报错:TypeError: (‘Keyword argument not understood:‘, ‘offset‘)
Keras报错:TypeError: (‘Keyword argument not understood:‘, ‘offset‘)
154 0
TypeError: custom() got an unexpected keyword argument ‘path‘
TypeError: custom() got an unexpected keyword argument ‘path‘
135 0
|
TensorFlow 算法框架/工具
解决TypeError: tf__update_state() got an unexpected keyword argument ‘sample_weight‘
解决TypeError: tf__update_state() got an unexpected keyword argument ‘sample_weight‘
252 0
解决TypeError: tf__update_state() got an unexpected keyword argument ‘sample_weight‘
解决TypeError: __init__() takes from 1 to 3 positional arguments but 6 were given
解决TypeError: __init__() takes from 1 to 3 positional arguments but 6 were given
405 0
解决TypeError: __init__() takes from 1 to 3 positional arguments but 6 were given
params argument given to the optimizer should be an iterable
params argument given to the optimizer should be an iterable
166 0
params argument given to the optimizer should be an iterable
|
计算机视觉
成功解决TypeError: __init__() got an unexpected keyword argument 'n_iterations'
成功解决TypeError: __init__() got an unexpected keyword argument 'n_iterations'
成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'
成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'
python TypeError: missing 1 required positional argument:'self'
python TypeError: missing 1 required positional argument:'self'
python TypeError: missing 1 required positional argument:'self'