Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: fix EX03 in pandas.errors #56867

Merged
merged 2 commits into from
Jan 15, 2024
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
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
Loading