[英]How to solve type object 'Series' has no attribute '_get_dtypes' error using modin.pandas?
I am using modin.pandas to remove the duplicates from dataframe.我正在使用 modin.pandas 从 dataframe 中删除重复项。
import modin.pandas as pd
import json, ast
df = pd.DataFrame(columns=['contact_id', 'test_id'])
df['test_id'] = df['test_id'].astype(str) # Coverting test_id column data type to string
df = df.drop_duplicates(subset=['test_id', 'contact_id'], keep='first') #removing the dupplicates row
df['test_id'] = df['test_id'].apply(ast.literal_eval) # converting test_id column data type to dict
Getting below error低于错误
type object 'Series' has no attribute '_get_dtypes'
Can anyone guide me how can I fix this?谁能指导我如何解决这个问题?
It looks like that Modin version, which you are using, is old enough.看起来您正在使用的 Modin 版本已经足够老了。 I don't have the issue on the latest master.
我对最新的主人没有问题。 Please, try install Modin from sources:
请尝试从以下来源安装 Modin:
pip uninstall modin # remove current Modin at first
pip install git+https://github.com/modin-project/modin
By the way, Modin released 0.9.0 version recently.顺便说一句,Modin 最近发布了 0.9.0 版本。 You can also try to install it.
您也可以尝试安装它。
pip uninstall modin # remove current Modin at first
pip install modin
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.