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 SA01,ES01 for pandas.NaT #59660

Merged
merged 1 commit into from
Aug 30, 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
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
-i "pandas.MultiIndex.reorder_levels RT03,SA01" \
-i "pandas.NA SA01" \
-i "pandas.NaT SA01" \
-i "pandas.Period.freq GL08" \
-i "pandas.Period.freqstr SA01" \
-i "pandas.Period.ordinal GL08" \
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
Loading