From b616a9a94efc52030fa8041ff2743558ed4b40bc Mon Sep 17 00:00:00 2001 From: Jordan Murphy <35613487+jordan-d-murphy@users.noreply.github.com> Date: Thu, 22 Feb 2024 00:41:59 -0700 Subject: [PATCH] fix ES01 for pandas.Flags --- ci/code_checks.sh | 1 - pandas/core/flags.py | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 04c3ff3a42971..6469f39e7c332 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -521,7 +521,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.DatetimeIndex.year\ pandas.DatetimeTZDtype.tz\ pandas.DatetimeTZDtype.unit\ - pandas.Flags\ pandas.HDFStore.get\ pandas.HDFStore.info\ pandas.HDFStore.keys\ diff --git a/pandas/core/flags.py b/pandas/core/flags.py index 8dcf49745bf2d..eceb86dc61d9f 100644 --- a/pandas/core/flags.py +++ b/pandas/core/flags.py @@ -11,6 +11,10 @@ class Flags: """ Flags that apply to pandas objects. + “Flags” differ from “metadata”. Flags reflect properties of the pandas + object (the Series or DataFrame). Metadata refer to properties of the + dataset, and should be stored in DataFrame.attrs. + Parameters ---------- obj : Series or DataFrame @@ -30,6 +34,11 @@ class Flags: it is expected that every method taking or returning one or more DataFrame or Series objects will propagate ``allows_duplicate_labels``. + See Also + -------- + DataFrame.attrs : Dictionary of global attributes of this dataset. + Series.attrs : Dictionary of global attributes of this dataset. + Examples -------- Attributes can be set in two ways: