Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
-i "pandas.core.resample.Resampler.quantile PR01,PR07" \
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
-i "pandas.plotting.andrews_curves RT03,SA01" \
-i "pandas.tseries.offsets.BDay PR02,SA01" \
-i "pandas.tseries.offsets.BQuarterBegin.is_on_offset GL08" \
Expand Down
10 changes: 10 additions & 0 deletions pandas/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,16 @@ class ValueLabelTypeMismatch(Warning):
"""
Warning raised by to_stata on a category column that contains non-string values.

When exporting data to Stata format using the `to_stata` method, category columns
must have string values as labels. If a category column contains non-string values
(e.g., integers, floats, or other types), this warning is raised to indicate that
the Stata file may not correctly represent the data.

See Also
--------
DataFrame.to_stata : Export DataFrame object to Stata dta format.
Series.cat : Accessor for categorical properties of the Series values.

Examples
--------
>>> df = pd.DataFrame({"categories": pd.Series(["a", 2], dtype="category")})
Expand Down
Loading