Skip to content

Commit 952cbb6

Browse files
DOC: fix SA01,ES01 for pandas.NaT (#59660)
1 parent 929e8c5 commit 952cbb6

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7171
-i ES01 `# For now it is ok if docstrings are missing the extended summary` \
7272
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
7373
-i "pandas.NA SA01" \
74-
-i "pandas.NaT SA01" \
7574
-i "pandas.Period.freq GL08" \
7675
-i "pandas.Period.ordinal GL08" \
7776
-i "pandas.Period.strftime PR01,SA01" \

pandas/_libs/tslibs/nattype.pyx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,22 @@ class NaTType(_NaT):
348348
"""
349349
(N)ot-(A)-(T)ime, the time equivalent of NaN.
350350
351+
NaT is used to denote missing or null values in datetime and timedelta objects
352+
in pandas. It functions similarly to how NaN is used for numerical data.
353+
Operations with NaT will generally propagate the NaT value, similar to NaN.
354+
NaT can be used in pandas data structures like Series and DataFrame
355+
to represent missing datetime values. It is useful in data analysis
356+
and time series analysis when working with incomplete or sparse
357+
time-based data. Pandas provides robust handling of NaT to ensure
358+
consistency and reliability in computations involving datetime objects.
359+
360+
See Also
361+
--------
362+
NA : NA ("not available") missing value indicator.
363+
isna : Detect missing values (NaN or NaT) in an array-like object.
364+
notna : Detect non-missing values.
365+
numpy.nan : Floating point representation of Not a Number (NaN) for numerical data.
366+
351367
Examples
352368
--------
353369
>>> pd.DataFrame([pd.Timestamp("2023"), np.nan], columns=["col_1"])

0 commit comments

Comments
 (0)