Skip to content

Commit 6d666a4

Browse files
Merge branch 'main' into replace-flake8-rst
2 parents 34829e4 + 1be2637 commit 6d666a4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8686
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
8787
-i "pandas.core.resample.Resampler.quantile PR01,PR07" \
8888
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
89-
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
9089
-i "pandas.plotting.andrews_curves RT03,SA01" \
9190
-i "pandas.tseries.offsets.BDay PR02,SA01" \
9291
-i "pandas.tseries.offsets.BQuarterBegin.is_on_offset GL08" \

pandas/errors/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,16 @@ class ValueLabelTypeMismatch(Warning):
820820
"""
821821
Warning raised by to_stata on a category column that contains non-string values.
822822
823+
When exporting data to Stata format using the `to_stata` method, category columns
824+
must have string values as labels. If a category column contains non-string values
825+
(e.g., integers, floats, or other types), this warning is raised to indicate that
826+
the Stata file may not correctly represent the data.
827+
828+
See Also
829+
--------
830+
DataFrame.to_stata : Export DataFrame object to Stata dta format.
831+
Series.cat : Accessor for categorical properties of the Series values.
832+
823833
Examples
824834
--------
825835
>>> df = pd.DataFrame({"categories": pd.Series(["a", 2], dtype="category")})

0 commit comments

Comments
 (0)