diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 5487dc19338da..102abf4be187c 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -174,7 +174,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.value_labels RT03,SA01" \ -i "pandas.io.stata.StataReader.variable_labels RT03,SA01" \ -i "pandas.io.stata.StataWriter.write_file SA01" \ -i "pandas.json_normalize RT03,SA01" \ diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 6b988d8fed6bf..f1d289726c9c8 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -2076,9 +2076,19 @@ def value_labels(self) -> dict[str, dict[int, str]]: """ Return a nested dict associating each variable name to its value and label. + This method retrieves the value labels from a Stata file. Value labels are + mappings between the coded values and their corresponding descriptive labels + in a Stata dataset. + Returns ------- dict + A python dictionary. + + See Also + -------- + read_stata : Read Stata file into DataFrame. + DataFrame.to_stata : Export DataFrame object to Stata dta format. Examples --------