Skip to content

Commit 2a17200

Browse files
tuhinsharma121KevsterAmp
authored andcommitted
DOC: fix SA01,ES01 for pandas.errors.IntCastingNaNError (pandas-dev#60442)
1 parent c58c752 commit 2a17200

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
104104
-i "pandas.core.resample.Resampler.std SA01" \
105105
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
106106
-i "pandas.core.resample.Resampler.var SA01" \
107-
-i "pandas.errors.IntCastingNaNError SA01" \
108107
-i "pandas.errors.NullFrequencyError SA01" \
109108
-i "pandas.errors.NumbaUtilError SA01" \
110109
-i "pandas.errors.PerformanceWarning SA01" \

pandas/errors/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ class IntCastingNaNError(ValueError):
2020
"""
2121
Exception raised when converting (``astype``) an array with NaN to an integer type.
2222
23+
This error occurs when attempting to cast a data structure containing non-finite
24+
values (such as NaN or infinity) to an integer data type. Integer types do not
25+
support non-finite values, so such conversions are explicitly disallowed to
26+
prevent silent data corruption or unexpected behavior.
27+
28+
See Also
29+
--------
30+
DataFrame.astype : Method to cast a pandas DataFrame object to a specified dtype.
31+
Series.astype : Method to cast a pandas Series object to a specified dtype.
32+
2333
Examples
2434
--------
2535
>>> pd.DataFrame(np.array([[1, np.nan], [2, 3]]), dtype="i8")

0 commit comments

Comments
 (0)