成功解决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] ]




上一篇: 成功解决ValueError: Found input variables with inconsistent numbers of samples: [86, 891]

下一篇: CV之FR(H+k机器学习):基于每人几张人脸图片训练H+k模型实现(国内外明星)新人脸图像的姓名预测(准确度高达100%)

Keras fit函数中传入回调函数,提示『TypeError: set_model() missing 1 required positional argument: 'model'』错误

文章目录问题描述Solutionother问题描述fit中使用回调函数,提示 TypeError: set_model() missing 1 required positional argument: 'model'自己的代码:class TimeHistory(keras.callbacks.Callback): def on_train_begin(self, logs={...

Tensorflow TypeError: load() missing 2 required positional arguments: 'tags' and 'export_dir'

今天在运行别人的tensorflow代码的时候,出现了下面的错误:This function will only be available

uvicorn启动Falcon请求报错TypeError: __call__() missing 2 required positional arguments: 'receive'

报错代码[root@apiflask-001 pypy_examples]# /usr/local/pypy3/bin/uvicorn things_asgi:appINFO: Started server process [15212]INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)ERROR: Exc