From b75d6ad6569d814c18b6b93c4682deb8471b610c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dea=20Mar=C3=ADa=20L=C3=A9on?= Date: Thu, 20 Jul 2023 22:26:40 +0200 Subject: [PATCH] DOC: Fixing EX01 - Added examples (#54213) * to_feather example * examples on correct file --- ci/code_checks.sh | 1 - pandas/core/frame.py | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index c63435b257032..fa42bedc625d8 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -76,7 +76,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.test \ pandas.NaT \ pandas.read_feather \ - pandas.DataFrame.to_feather \ pandas.read_orc \ pandas.read_sas \ pandas.read_spss \ diff --git a/pandas/core/frame.py b/pandas/core/frame.py index a57caa68ce738..b23c3ad086acf 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2757,6 +2757,11 @@ def to_feather(self, path: FilePath | WriteBuffer[bytes], **kwargs) -> None: `_. Requires a default index. For saving the DataFrame with your custom index use a method that supports custom indices e.g. `to_parquet`. + + Examples + -------- + >>> df = pd.DataFrame([[1, 2, 3], [4, 5, 6]]) + >>> df.to_feather("file.feather") # doctest: +SKIP """ from pandas.io.feather_format import to_feather