Skip to content

Commit

Permalink
DOC: fix SA01,ES01 for pandas.NaT (#59660)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhinsharma121 authored Aug 30, 2024
1 parent 929e8c5 commit 952cbb6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i ES01 `# For now it is ok if docstrings are missing the extended summary` \
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
-i "pandas.NA SA01" \
-i "pandas.NaT SA01" \
-i "pandas.Period.freq GL08" \
-i "pandas.Period.ordinal GL08" \
-i "pandas.Period.strftime PR01,SA01" \
Expand Down
16 changes: 16 additions & 0 deletions pandas/_libs/tslibs/nattype.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,22 @@ class NaTType(_NaT):
"""
(N)ot-(A)-(T)ime, the time equivalent of NaN.
NaT is used to denote missing or null values in datetime and timedelta objects
in pandas. It functions similarly to how NaN is used for numerical data.
Operations with NaT will generally propagate the NaT value, similar to NaN.
NaT can be used in pandas data structures like Series and DataFrame
to represent missing datetime values. It is useful in data analysis
and time series analysis when working with incomplete or sparse
time-based data. Pandas provides robust handling of NaT to ensure
consistency and reliability in computations involving datetime objects.
See Also
--------
NA : NA ("not available") missing value indicator.
isna : Detect missing values (NaN or NaT) in an array-like object.
notna : Detect non-missing values.
numpy.nan : Floating point representation of Not a Number (NaN) for numerical data.
Examples
--------
>>> pd.DataFrame([pd.Timestamp("2023"), np.nan], columns=["col_1"])
Expand Down

0 comments on commit 952cbb6

Please sign in to comment.