From fcd29d0765b402ff5ec3200b1fc4b4573961b13e Mon Sep 17 00:00:00 2001 From: Jernej Makovsek Date: Sun, 3 Oct 2021 23:18:33 +0200 Subject: [PATCH 1/2] Add clarifications to the docs --- pandas/core/frame.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index aad7213c93a1d..6642fe9895c56 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2552,7 +2552,8 @@ def to_stata( @deprecate_kwarg(old_arg_name="fname", new_arg_name="path") def to_feather(self, path: FilePathOrBuffer[AnyStr], **kwargs) -> None: """ - Write a DataFrame to the binary Feather format. + Write a DataFrame to the binary Feather format. Requires a default index. + For saving the DataFrame with your custom index, use e.g. `to_parquet`. Parameters ---------- From 3a403a583c353e79a8c37c5c6b7556b0c59ded3e Mon Sep 17 00:00:00 2001 From: Jernej Makovsek Date: Mon, 4 Oct 2021 02:21:41 +0200 Subject: [PATCH 2/2] Add notes section --- pandas/core/frame.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 6642fe9895c56..d98c6d1c5cfba 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2552,8 +2552,7 @@ def to_stata( @deprecate_kwarg(old_arg_name="fname", new_arg_name="path") def to_feather(self, path: FilePathOrBuffer[AnyStr], **kwargs) -> None: """ - Write a DataFrame to the binary Feather format. Requires a default index. - For saving the DataFrame with your custom index, use e.g. `to_parquet`. + Write a DataFrame to the binary Feather format. Parameters ---------- @@ -2565,6 +2564,13 @@ def to_feather(self, path: FilePathOrBuffer[AnyStr], **kwargs) -> None: `compression_level`, `chunksize` and `version` keywords. .. versionadded:: 1.1.0 + + Notes + ----- + This function writes the dataframe as a `feather file + `_. Requires a default + index. For saving the DataFrame with your custom index use a method that + supports custom indices e.g. `to_parquet`. """ from pandas.io.feather_format import to_feather