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

[FEA] Parity between codes returned by factorize API with pandas #13981

Closed
galipremsagar opened this issue Aug 28, 2023 · 0 comments · Fixed by #13982
Closed

[FEA] Parity between codes returned by factorize API with pandas #13981

galipremsagar opened this issue Aug 28, 2023 · 0 comments · Fixed by #13982
Assignees
Labels
feature request New feature or request Python Affects Python cuDF API.

Comments

@galipremsagar
Copy link
Contributor

Is your feature request related to a problem? Please describe.
pd.Series.factorize returns codes of int64 dtype's always. cudf.Series.factorize returns code with int8 or any other appropriate type that saves memory usage. This is a feature request to return int64 always only in pandas-compatibility mode to match pandas API behavior.

@galipremsagar galipremsagar added feature request New feature or request Python Affects Python cuDF API. labels Aug 28, 2023
@galipremsagar galipremsagar self-assigned this Aug 28, 2023
rapids-bot bot pushed a commit that referenced this issue Aug 28, 2023
…ze` API (#13982)

closes #13981 

This PR enables parity with pandas `factorize` API by returning `codes` with `int64` dtype only in pandas-compatibility mode. When the pandas-compatibility mode is turned off, `cudf` will calculate the appropriate dtype that needs to be returned to save memory usage.

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - Matthew Roeschke (https://github.com/mroeschke)

URL: #13982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant