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

[BUG] Series.apply does not retain the Series name #10715

Closed
bdice opened this issue Apr 22, 2022 · 2 comments · Fixed by #10716
Closed

[BUG] Series.apply does not retain the Series name #10715

bdice opened this issue Apr 22, 2022 · 2 comments · Fixed by #10716
Assignees
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@bdice
Copy link
Contributor

bdice commented Apr 22, 2022

Describe the bug
Calling cudf.Series.apply should retain the Series name to align with pandas.Series.apply behavior. The previous behavior of cudf.Series.applymap (deprecated in favor of cudf.Series.apply) correctly retains the Series name.

Steps/Code to reproduce bug

import pandas as pd
import cudf

ps = pd.Series(range(10), name="awesome_numbers")
result = ps.apply(lambda x: x + 42)
print(result.name)  # awesome_numbers

gs = cudf.from_pandas(ps)
result = gs.apply(lambda x: x + 42)
print(result.name)  # None

gs = cudf.from_pandas(ps)
result = gs.applymap(lambda x: x + 42)  # FutureWarning: Series.applymap is deprecated [...]
print(result.name)  # awesome_numbers

Expected behavior
name should be retained.

@vyasr
Copy link
Contributor

vyasr commented Apr 25, 2022

When this issue is fixed I suppose we should also remove https://github.com/rapidsai/cudf/pull/10685/files#r856370814.

@bdice
Copy link
Contributor Author

bdice commented Apr 25, 2022

When this issue is fixed I suppose we should also remove https://github.com/rapidsai/cudf/pull/10685/files#r856370814.

I have a follow-up PR planned once PRs #10716 and #10685 are merged.

edit: #10738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants