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

DEPR: Categorical.to_list #51254

Closed
jbrockmendel opened this issue Feb 8, 2023 · 5 comments · Fixed by #51997 or #52130
Closed

DEPR: Categorical.to_list #51254

jbrockmendel opened this issue Feb 8, 2023 · 5 comments · Fixed by #51997 or #52130
Assignees
Labels
API - Consistency Internal Consistency of API/Behavior Categorical Categorical Data Type Deprecate Functionality to remove in pandas good first issue

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented Feb 8, 2023

We have this as an alias for tolist for Categorical but not other EAs. We should either deprecate it or add the alias on the base class. I prefer deprecation.

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 8, 2023
@lithomas1 lithomas1 added Categorical Categorical Data Type Deprecate Functionality to remove in pandas API - Consistency Internal Consistency of API/Behavior and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 9, 2023
@phershbe
Copy link
Contributor

@jbrockmendel @lithomas1 I'm interested in working on this. I've done two pull requests on fixing tests here and am interested in learning and contributing more.

Is this as simple as deleting the to_list on Line 555 of https://github.com/pandas-dev/pandas/blob/main/pandas/core/arrays/categorical.py and documenting the change? There are several other instances of to_list when searching the code base, but the others seem to be the aliases for Series and Index.

@jbrockmendel
Copy link
Member Author

I'd suggest waiting to make sure there is consensus that this is worthwhile.

@topper-123
Copy link
Contributor

I agree deprecation is the sensible thing to do here.

@joseph042295
Copy link

take

@jbrockmendel
Copy link
Member Author

That part of #51997 was reverted, reopening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API - Consistency Internal Consistency of API/Behavior Categorical Categorical Data Type Deprecate Functionality to remove in pandas good first issue
Projects
None yet
5 participants