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

ENH: Follow up to PR #59577, Series.str.get_dummies() raise on str type #59786

Open
wants to merge 42 commits into
base: main
Choose a base branch
from

Conversation

aaronchucarroll
Copy link
Contributor

  • [Tests added and passed]
  • All [code checks passed]

aaronchucarroll and others added 30 commits August 21, 2024 14:26
@aaronchucarroll
Copy link
Contributor Author

@rhshadrach Please see latest changes

@rhshadrach
Copy link
Member

@aaronchucarroll - I believe there is an issue related to this, is that right?

@aaronchucarroll
Copy link
Contributor Author

aaronchucarroll commented Sep 26, 2024

I don't think there exists an issue for this. These are the requested follow-up changes to my last PR (#59577)

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the followup!

@mroeschke - I've resolved your comments from #59577 where they have been taken care of. There are a few comments that could use your review.

pandas/tests/strings/test_get_dummies.py Outdated Show resolved Hide resolved
pandas/core/strings/accessor.py Outdated Show resolved Hide resolved
@aaronchucarroll
Copy link
Contributor Author

@rhshadrach Please see new changes

@@ -54,9 +54,8 @@ Other enhancements
- :meth:`Series.cummin` and :meth:`Series.cummax` now supports :class:`CategoricalDtype` (:issue:`52335`)
- :meth:`Series.plot` now correctly handle the ``ylabel`` parameter for pie charts, allowing for explicit control over the y-axis label (:issue:`58239`)
- :meth:`DataFrame.plot.scatter` argument ``c`` now accepts a column of strings, where rows with the same string are colored identically (:issue:`16827` and :issue:`16485`)
- :meth:`Series.map` can now accept kwargs to pass on to func (:issue:`59814`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you restore this note. The new note being added looks good.

@@ -2482,12 +2482,16 @@ def get_dummies(
1 False False False
2 True False True
"""
from pandas.core.dtypes.common import is_string_dtype
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pandas.core.dtypes.common is already being imported from at the top of this file. Can you move this import up there.

@mroeschke mroeschke added the Strings String extension data type and string data label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants