Skip to content

Commit

Permalink
DOC: Fix docstrings for errors (#60523)
Browse files Browse the repository at this point in the history
* DOC: Fix docstrings for errors

* DOC: Fix docstrings for errors
  • Loading branch information
sunlight798 authored Dec 9, 2024
1 parent 2d774e7 commit f3b7985
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
3 changes: 0 additions & 3 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.core.resample.Resampler.std SA01" \
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
-i "pandas.core.resample.Resampler.var SA01" \
-i "pandas.errors.NullFrequencyError SA01" \
-i "pandas.errors.NumbaUtilError SA01" \
-i "pandas.errors.PerformanceWarning SA01" \
-i "pandas.errors.UndefinedVariableError PR01,SA01" \
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
-i "pandas.io.json.build_table_schema PR07,RT03,SA01" \
Expand Down
18 changes: 18 additions & 0 deletions pandas/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ class NullFrequencyError(ValueError):
Particularly ``DatetimeIndex.shift``, ``TimedeltaIndex.shift``,
``PeriodIndex.shift``.
See Also
--------
Index.shift : Shift values of Index.
Series.shift : Shift values of Series.
Examples
--------
>>> df = pd.DatetimeIndex(["2011-01-01 10:00", "2011-01-01"], freq=None)
Expand All @@ -58,6 +63,12 @@ class PerformanceWarning(Warning):
"""
Warning raised when there is a possible performance impact.
See Also
--------
DataFrame.set_index : Set the DataFrame index using existing columns.
DataFrame.loc : Access a group of rows and columns by label(s) \
or a boolean array.
Examples
--------
>>> df = pd.DataFrame(
Expand Down Expand Up @@ -385,6 +396,13 @@ class NumbaUtilError(Exception):
"""
Error raised for unsupported Numba engine routines.
See Also
--------
DataFrame.groupby : Group DataFrame using a mapper or by a Series of columns.
Series.groupby : Group Series using a mapper or by a Series of columns.
DataFrame.agg : Aggregate using one or more operations over the specified axis.
Series.agg : Aggregate using one or more operations over the specified axis.
Examples
--------
>>> df = pd.DataFrame(
Expand Down

0 comments on commit f3b7985

Please sign in to comment.