-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: restore to_frame() name=None behaviour but deprecate it #45523
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@meeseeksdev backport 1.4.x |
…viour but deprecate it
Something went wrong ... Please have a look at my logs. |
@@ -696,6 +696,7 @@ Other Deprecations | |||
- Deprecated the behavior of :meth:`Timestamp.utcfromtimestamp`, in the future it will return a timezone-aware UTC :class:`Timestamp` (:issue:`22451`) | |||
- Deprecated :meth:`NaT.freq` (:issue:`45071`) | |||
- Deprecated behavior of :class:`Series` and :class:`DataFrame` construction when passed float-dtype data containing ``NaN`` and an integer dtype ignoring the dtype argument; in a future version this will raise (:issue:`40110`) | |||
- Deprecated the behaviour of :meth:`Series.to_frame` and :meth:`Index.to_frame` to ignore the ``name`` argument when ``name=None``. Currently, this means to preserve the existing name, but in the future explicitly passing ``name=None`` will set ``None`` as the name of the column in the resulting DataFrame (:issue:`44212`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to ignore the name
argument when"
wording is kind of awkward, sounds like ignoring the argument is the future behavior. The next sentence clarifies this well. Could reword as just "with ``name=None``"
…deprecate it (#45529) Co-authored-by: Joris Van den Bossche <[email protected]>
In pandas 2.0, `to_frame(name=None)` allowed the resulting column name to be `None` pandas-dev/pandas#45523 Looks like based on the current default of `cudf.Series.to_frame`, this behavior was not reflected. Additionally, created a `SingleColumnFrame._to_frame` to more easily share the logic between `Series.to_frame` and `Index.to_frame` Authors: - Matthew Roeschke (https://github.com/mroeschke) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) URL: #16698
Closes #45448