Sangram Badi
Sangram Badi

Reputation: 4274

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.

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?

Upvotes: 0

Views: 215

Answers (1)

Yaroslav
Yaroslav

Reputation: 71

It looks like that Modin version, which you are using, is old enough. I don't have the issue on the latest master. Please, try install Modin from sources:

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. You can also try to install it.

pip uninstall modin # remove current Modin at first
pip install modin

Upvotes: 1

Related Questions