Skip to content

Commit

Permalink
DOC: fix PR01,SA01 for pandas.errors.UndefinedVariableError (#60570)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhinsharma121 authored Dec 16, 2024
1 parent 57981d2 commit 659eecf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,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.UndefinedVariableError PR01,SA01" \
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
-i "pandas.plotting.andrews_curves RT03,SA01" \
-i "pandas.tseries.offsets.BDay PR02,SA01" \
Expand Down
14 changes: 14 additions & 0 deletions pandas/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,20 @@ class UndefinedVariableError(NameError):
It will also specify whether the undefined variable is local or not.
Parameters
----------
name : str
The name of the undefined variable.
is_local : bool or None, optional
Indicates whether the undefined variable is considered a local variable.
If ``True``, the error message specifies it as a local variable.
If ``False`` or ``None``, the variable is treated as a non-local name.
See Also
--------
DataFrame.query : Query the columns of a DataFrame with a boolean expression.
DataFrame.eval : Evaluate a string describing operations on DataFrame columns.
Examples
--------
>>> df = pd.DataFrame({"A": [1, 1, 1]})
Expand Down

0 comments on commit 659eecf

Please sign in to comment.