Skip to content

Commit

Permalink
DOC: Enforce Numpy Docstring Validation for pandas.IntervalDtype (#58521
Browse files Browse the repository at this point in the history
)

* DOC: add PR01,SA01 in pandas.IntervalDtype

* DOC: remove PR01,SA01 in pandas.IntervalDtype
  • Loading branch information
tuhinsharma121 authored May 2, 2024
1 parent 9110f7c commit 9fee6cf
Show file tree
Hide file tree
Showing 2 changed files with 7 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 @@ -91,7 +91,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Interval.left SA01" \
-i "pandas.Interval.mid SA01" \
-i "pandas.Interval.right SA01" \
-i "pandas.IntervalDtype PR01,SA01" \
-i "pandas.IntervalDtype.subtype SA01" \
-i "pandas.IntervalIndex.closed SA01" \
-i "pandas.IntervalIndex.contains RT03" \
Expand Down
7 changes: 7 additions & 0 deletions pandas/core/dtypes/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,9 @@ class IntervalDtype(PandasExtensionDtype):
----------
subtype : str, np.dtype
The dtype of the Interval bounds.
closed : {'right', 'left', 'both', 'neither'}, default 'right'
Whether the interval is closed on the left-side, right-side, both or
neither. See the Notes for more detailed explanation.
Attributes
----------
Expand All @@ -1204,6 +1207,10 @@ class IntervalDtype(PandasExtensionDtype):
-------
None
See Also
--------
PeriodDtype : An ExtensionDtype for Period data.
Examples
--------
>>> pd.IntervalDtype(subtype="int64", closed="both")
Expand Down

0 comments on commit 9fee6cf

Please sign in to comment.