Skip to content

Commit 691abba

Browse files
yuanx749pmhatre1
authored andcommitted
DOC: fix EX03 in pandas.errors (pandas-dev#56867)
1 parent 20ed5e1 commit 691abba

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

ci/code_checks.sh

-4
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7676
pandas.errors.DatabaseError \
7777
pandas.errors.IndexingError \
7878
pandas.errors.InvalidColumnName \
79-
pandas.errors.PossibleDataLossError \
80-
pandas.errors.PossiblePrecisionLoss \
81-
pandas.errors.SettingWithCopyError \
8279
pandas.errors.SettingWithCopyWarning \
8380
pandas.errors.SpecificationError \
8481
pandas.errors.UndefinedVariableError \
85-
pandas.errors.ValueLabelTypeMismatch \
8682
pandas.Timestamp.ceil \
8783
pandas.Timestamp.floor \
8884
pandas.Timestamp.round \

pandas/errors/__init__.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ class SettingWithCopyError(ValueError):
425425
--------
426426
>>> pd.options.mode.chained_assignment = 'raise'
427427
>>> df = pd.DataFrame({'A': [1, 1, 1, 2, 2]}, columns=['A'])
428-
>>> df.loc[0:3]['A'] = 'a' # doctest: +SKIP
428+
>>> df.loc[0:3]['A'] = 'a' # doctest: +SKIP
429429
... # SettingWithCopyError: A value is trying to be set on a copy of a...
430430
"""
431431

@@ -665,8 +665,8 @@ class PossibleDataLossError(Exception):
665665
666666
Examples
667667
--------
668-
>>> store = pd.HDFStore('my-store', 'a') # doctest: +SKIP
669-
>>> store.open("w") # doctest: +SKIP
668+
>>> store = pd.HDFStore('my-store', 'a') # doctest: +SKIP
669+
>>> store.open("w") # doctest: +SKIP
670670
... # PossibleDataLossError: Re-opening the file [my-store] with mode [a]...
671671
"""
672672

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

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

0 commit comments

Comments
 (0)