Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a custom pandas accessor with Modin #7281

Closed
anaypat5 opened this issue May 17, 2024 · 2 comments
Closed

Using a custom pandas accessor with Modin #7281

anaypat5 opened this issue May 17, 2024 · 2 comments
Labels
question ❓ Questions about Modin

Comments

@anaypat5
Copy link

anaypat5 commented May 17, 2024

Hi, I was wondering if its possible to use custom pandas accessors with Modin. I have one set up, but when using Modin with Ray it will throw the error that DataFrame object has no attribute <accessor>. I am currently circumventing this issue by converting the Modin DataFrame to a base Pandas DataFrame, but I wanted to see if this is something that is already implemented, such that I don't have to convert my DataFrame every time I want to use the accessor, especially when the DataFrames are getting large. Thanks.

@anaypat5 anaypat5 added question ❓ Questions about Modin Triage 🩹 Issues that need triage labels May 17, 2024
@noloerino
Copy link
Collaborator

Hi @anaypat5, are you trying to add a custom method on modin frames like these? https://pandas.pydata.org/docs/development/extending.html

You can do this in modin with modin.pandas.api.extensions.register_dataframe_accessor (which modifies modin.pandas.DataFrame), register_series_accessor (modifies modin.pandas.Series), and register_pd_accessor (modifies the top-level modin.pandas namespace). Please try it out and see if it works.

@noloerino noloerino removed the Triage 🩹 Issues that need triage label May 20, 2024
@noloerino
Copy link
Collaborator

@anaypat5 I'm marking this issue as closed for now--feel free to reopen or file a new one if you need further help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question ❓ Questions about Modin
Projects
None yet
Development

No branches or pull requests

2 participants