DEPR: restore to_frame() name=None behaviour but deprecate it by jorisvandenbossche · Pull Request #45523 · pandas-dev/pandas (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation4 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

jorisvandenbossche

@jorisvandenbossche

phofl

Choose a reason for hiding this comment

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

lgtm

@jreback

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request

Jan 21, 2022

@jorisvandenbossche @meeseeksmachine

@lumberbot-app

Something went wrong ... Please have a look at my logs.

jbrockmendel

@@ -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`)

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``"

jreback pushed a commit that referenced this pull request

Jan 21, 2022

@meeseeksmachine @jorisvandenbossche

…deprecate it (#45529)

Co-authored-by: Joris Van den Bossche jorisvandenbossche@gmail.com

rapids-bot bot pushed a commit to rapidsai/cudf that referenced this pull request

Aug 30, 2024

@mroeschke

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:

Approvers:

URL: #16698

Labels

Deprecate

Functionality to remove in pandas

Regression

Functionality that used to work in a prior pandas version