简体   繁体   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?

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.

相关问题 导入 modin.pandas 导致错误:AttributeError:类型 object 'pyarrow.lib.Message' 没有属性 '__reduce_cython__' - import modin.pandas causes ERROR: AttributeError: type object 'pyarrow.lib.Message' has no attribute '__reduce_cython__' 使用 modin.pandas 应用更快的熊猫 - Faster pandas apply using modin.pandas AttributeError:“系列”对象使用熊猫没有属性“ get_type” - AttributeError: 'Series' object has no attribute 'get_type' using pandas 不可散列类型:将 modin 与 pandas 一起使用时的系列? - Unhashable type: Series when using modin with pandas? 对 pandas 使用 .dtypes() 时出现系列错误 - Series Error when using .dtypes() for pandas 使用 Technical-analysis-library-in-python 时如何解决“AttributeError: 'Series' object has no attribute '_check_fillna'”错误 - How do I solve the "AttributeError: 'Series' object has no attribute '_check_fillna'" error when using the technical-analysis-library-in-python Pandas - '系列' object 没有属性 - Pandas - 'Series' object has no attribute 如何解决 object has no attribute 'action' 错误? - How to solve object has no attribute 'action' error? pandas.Series.get失败,原因:对象没有属性“值” - pandas.Series.get fails with: object has no attribute 'values' 如何解决属性错误:'Cursor' object 在 pymongo 中没有属性 'noCursorTimeout'? - How to solve attribute error: 'Cursor' object has no attribute 'noCursorTimeout' in pymongo?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM