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

DEP: Deprecate passing fill_value and freq to shift #54818

Merged
merged 4 commits into from
Aug 29, 2023

Conversation

phofl
Copy link
Member

@phofl phofl commented Aug 28, 2023

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

see #53832

@phofl phofl added the Deprecate Functionality to remove in pandas label Aug 28, 2023
@phofl phofl added this to the 2.1 milestone Aug 28, 2023
@@ -587,6 +587,7 @@ Other Deprecations
- Deprecated values ``"pad"``, ``"ffill"``, ``"bfill"``, ``"backfill"`` for :meth:`Series.interpolate` and :meth:`DataFrame.interpolate`, use ``obj.ffill()`` or ``obj.bfill()`` instead (:issue:`53581`)
- Deprecated the behavior of :meth:`Index.argmax`, :meth:`Index.argmin`, :meth:`Series.argmax`, :meth:`Series.argmin` with either all-NAs and ``skipna=True`` or any-NAs and ``skipna=False`` returning -1; in a future version this will raise ``ValueError`` (:issue:`33941`, :issue:`33942`)
- Deprecated allowing non-keyword arguments in :meth:`DataFrame.to_sql` except ``name`` and ``con`` (:issue:`54229`)
- Deprecated silently ignoring ``fill_value`` when passing both ``freq`` and ``fill_value`` to :meth:`DataFrame.shift` and :meth:`Series.shift` and :meth:`.DataFrameGroupBy.shift`; in a future version this will raise ``ValueError`` (:issue:`53832`)
Copy link
Member

Choose a reason for hiding this comment

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

the "and" after DataFrame.shift should just be a comma

"Cannot pass both 'freq' and 'fill_value' to "
f"{type(self).__name__}.shift"
warnings.warn(
"Passing a 'freq' together with a 'fill_value' silently ignores "
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 explicitly say "is deprecated" in here somehwre

@phofl phofl merged commit a73fa32 into pandas-dev:main Aug 29, 2023
38 checks passed
@phofl phofl deleted the deprecation branch August 29, 2023 14:44
meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Aug 29, 2023
mroeschke pushed a commit that referenced this pull request Aug 29, 2023
… and freq to shift) (#54849)

Backport PR #54818: DEP: Deprecate passing fill_value and freq to shift

Co-authored-by: Patrick Hoefler <61934744+phofl@users.noreply.github.com>
mroeschke pushed a commit to mroeschke/pandas that referenced this pull request Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants