簡體   English   中英

如何使用 modin.pandas 解決類型 object 'Series' has no attribute '_get_dtypes' 錯誤?

[英]How to solve type object 'Series' has no attribute '_get_dtypes' error using modin.pandas?

我正在使用 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

低於錯誤

type object 'Series' has no attribute '_get_dtypes'

誰能指導我如何解決這個問題?

看起來您正在使用的 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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM