0

我正在使用 modin.pandas 从数据框中删除重复项。

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

低于错误

type object 'Series' has no attribute '_get_dtypes'

谁能指导我如何解决这个问题?

4

1 回答 1

1

看起来您正在使用的 Modin 版本已经足够老了。我对最新的主人没有问题。请尝试从以下来源安装 Modin:

pip uninstall modin # remove current Modin at first
pip install git+https://github.com/modin-project/modin

顺便说一句,Modin 最近发布了 0.9.0 版本。您也可以尝试安装它。

pip uninstall modin # remove current Modin at first
pip install modin
于 2021-03-09T06:36:34.797 回答