From 378146ce23a249ae45e1080ee686a9ece12621ca Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Sat, 18 May 2024 11:12:21 +0530 Subject: [PATCH] DOC: add SA01 for pandas.api.extensions.ExtensionArray._from_sequence_of_strings --- ci/code_checks.sh | 1 - pandas/core/arrays/base.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 180083dbbb742..2e57b65e7d938 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -293,7 +293,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Timestamp.value GL08" \ -i "pandas.Timestamp.weekday SA01" \ -i "pandas.Timestamp.year GL08" \ - -i "pandas.api.extensions.ExtensionArray._from_sequence_of_strings SA01" \ -i "pandas.api.extensions.ExtensionArray._hash_pandas_object RT03,SA01" \ -i "pandas.api.extensions.ExtensionArray._pad_or_backfill PR01,RT03,SA01" \ -i "pandas.api.extensions.ExtensionArray._reduce RT03,SA01" \ diff --git a/pandas/core/arrays/base.py b/pandas/core/arrays/base.py index 8ad4ee433a74e..e7ced7e89f179 100644 --- a/pandas/core/arrays/base.py +++ b/pandas/core/arrays/base.py @@ -365,6 +365,16 @@ def _from_sequence_of_strings( ------- ExtensionArray + See Also + -------- + api.extensions.ExtensionArray._from_sequence : Construct a new ExtensionArray + from a sequence of scalars. + api.extensions.ExtensionArray._from_factorized : Reconstruct an ExtensionArray + after factorization. + api.extensions.ExtensionArray._from_scalars : Strict analogue to _from_sequence, + allowing only sequences of scalars that should be specifically inferred to + the given dtype. + Examples -------- >>> pd.arrays.IntegerArray._from_sequence_of_strings(