Skip to content

Commit

Permalink
DOC: fix EX03 in pandas.errors (pandas-dev#56867)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanx749 authored and pmhatre1 committed May 7, 2024
1 parent 20ed5e1 commit 691abba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
pandas.errors.DatabaseError \
pandas.errors.IndexingError \
pandas.errors.InvalidColumnName \
pandas.errors.PossibleDataLossError \
pandas.errors.PossiblePrecisionLoss \
pandas.errors.SettingWithCopyError \
pandas.errors.SettingWithCopyWarning \
pandas.errors.SpecificationError \
pandas.errors.UndefinedVariableError \
pandas.errors.ValueLabelTypeMismatch \
pandas.Timestamp.ceil \
pandas.Timestamp.floor \
pandas.Timestamp.round \
Expand Down
10 changes: 5 additions & 5 deletions pandas/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ class SettingWithCopyError(ValueError):
--------
>>> pd.options.mode.chained_assignment = 'raise'
>>> df = pd.DataFrame({'A': [1, 1, 1, 2, 2]}, columns=['A'])
>>> df.loc[0:3]['A'] = 'a' # doctest: +SKIP
>>> df.loc[0:3]['A'] = 'a' # doctest: +SKIP
... # SettingWithCopyError: A value is trying to be set on a copy of a...
"""

Expand Down Expand Up @@ -665,8 +665,8 @@ class PossibleDataLossError(Exception):
Examples
--------
>>> store = pd.HDFStore('my-store', 'a') # doctest: +SKIP
>>> store.open("w") # doctest: +SKIP
>>> store = pd.HDFStore('my-store', 'a') # doctest: +SKIP
>>> store.open("w") # doctest: +SKIP
... # PossibleDataLossError: Re-opening the file [my-store] with mode [a]...
"""

Expand Down Expand Up @@ -734,7 +734,7 @@ class PossiblePrecisionLoss(Warning):
Examples
--------
>>> df = pd.DataFrame({"s": pd.Series([1, 2**53], dtype=np.int64)})
>>> df.to_stata('test') # doctest: +SKIP
>>> df.to_stata('test') # doctest: +SKIP
... # PossiblePrecisionLoss: Column converted from int64 to float64...
"""

Expand All @@ -746,7 +746,7 @@ class ValueLabelTypeMismatch(Warning):
Examples
--------
>>> df = pd.DataFrame({"categories": pd.Series(["a", 2], dtype="category")})
>>> df.to_stata('test') # doctest: +SKIP
>>> df.to_stata('test') # doctest: +SKIP
... # ValueLabelTypeMismatch: Stata value labels (pandas categories) must be str...
"""

Expand Down

0 comments on commit 691abba

Please sign in to comment.