Fetch_openml得到一个意外的关键字参数解析器


from sklearn.datasets import fetch_openml

survey = fetch_openml(data_id=534,as_frame=True,parser="pandas")

运行错误:fetch_openml() got an unexpected keyword argument 'parser'
那位好心人帮帮我,学习中遇到的问题,找了两天资料都没有解决方案。

基于Monster 组和GPT的调写:
根据sklearn.datasets.fetch_openml的文档,fetch_openml函数没有parser参数。因此,解决此问题的方法是删除parser参数,因为它不是fetch_openml函数的有效参数。

下面是修正后的代码:

from sklearn.datasets import fetch_openml

survey = fetch_openml(data_id=534, as_frame=True)


将使用默认的解析器(pandas),将数据集加载到pandas dataframe中。