diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 4a1a0042405e3..e612295adda12 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -179,7 +179,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.errors.ValueLabelTypeMismatch SA01" \ -i "pandas.infer_freq SA01" \ -i "pandas.io.json.build_table_schema PR07,RT03,SA01" \ - -i "pandas.io.stata.StataReader.data_label SA01" \ -i "pandas.io.stata.StataReader.value_labels RT03,SA01" \ -i "pandas.io.stata.StataReader.variable_labels RT03,SA01" \ -i "pandas.io.stata.StataWriter.write_file SA01" \ diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 4be06f93689f2..6b988d8fed6bf 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -2004,6 +2004,16 @@ def data_label(self) -> str: """ Return data label of Stata file. + The data label is a descriptive string associated with the dataset + stored in the Stata file. This property provides access to that + label, if one is present. + + See Also + -------- + io.stata.StataReader.variable_labels : Return a dict associating each variable + name with corresponding label. + DataFrame.to_stata : Export DataFrame object to Stata dta format. + Examples -------- >>> df = pd.DataFrame([(1,)], columns=["variable"])