From c888d400e850653931a4c640ffb2a77db57e36a1 Mon Sep 17 00:00:00 2001 From: Patrick Hoefler Date: Mon, 24 Oct 2022 23:58:58 +0200 Subject: [PATCH] DEP: Enforce fname to path renaming --- doc/source/whatsnew/v2.0.0.rst | 1 + pandas/core/frame.py | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 060de8ff8ef09..41b3559251624 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -224,6 +224,7 @@ Removal of prior version deprecations/changes - Enforced disallowing a string column label into ``times`` in :meth:`DataFrame.ewm` (:issue:`43265`) - Removed setting Categorical._codes directly (:issue:`41429`) - Enforced :meth:`Rolling.count` with ``min_periods=None`` to default to the size of the window (:issue:`31302`) +- Renamed ``fname`` to ``path`` in :meth:`DataFrame.to_parquet`, :meth:`DataFrame.to_stata` and :meth:`DataFrame.to_feather` (:issue:`30338`) - Removed the deprecated method ``mad`` from pandas classes (:issue:`11787`) - Removed the deprecated method ``tshift`` from pandas classes (:issue:`11631`) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index cc2bca1bcece6..f4aceb9fd9fde 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2583,7 +2583,6 @@ def _from_arrays( storage_options=_shared_docs["storage_options"], compression_options=_shared_docs["compression_options"] % "path", ) - @deprecate_kwarg(old_arg_name="fname", new_arg_name="path") def to_stata( self, path: FilePath | WriteBuffer[bytes], @@ -2743,7 +2742,6 @@ def to_stata( ) writer.write_file() - @deprecate_kwarg(old_arg_name="fname", new_arg_name="path") def to_feather(self, path: FilePath | WriteBuffer[bytes], **kwargs) -> None: """ Write a DataFrame to the binary Feather format. @@ -2853,7 +2851,6 @@ def to_parquet( ... @doc(storage_options=_shared_docs["storage_options"]) - @deprecate_kwarg(old_arg_name="fname", new_arg_name="path") def to_parquet( self, path: FilePath | WriteBuffer[bytes] | None = None,