File tree 3 files changed +50
-0
lines changed
3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,9 @@ from the ``Series``:
210
210
ser.array
211
211
pser.array
212
212
213
+ These return an instance of :class: `IntervalArray ` or :class: `arrays.PeriodArray `,
214
+ the new extension arrays that back interval and period data.
215
+
213
216
.. warning ::
214
217
215
218
For backwards compatibility, :attr: `Series.values ` continues to return
Original file line number Diff line number Diff line change @@ -218,6 +218,12 @@ class DatetimeArray(dtl.DatetimeLikeArrayMixin,
218
218
219
219
.. versionadded:: 0.24.0
220
220
221
+ .. warning::
222
+
223
+ DatetimeArray is currently experimental, and its API may change
224
+ without warning. In particular, :meth:`DatetimeArray.dtype` is
225
+ expected to change to always be an ``ExtensionDtype``.
226
+
221
227
Parameters
222
228
----------
223
229
values : Series, Index, DatetimeArray, ndarray
@@ -511,6 +517,12 @@ def dtype(self):
511
517
"""
512
518
The dtype for the DatetimeArray.
513
519
520
+ .. warning::
521
+
522
+ A future version of pandas will change dtype to never be a
523
+ ``numpy.dtype``. Instead it will always be a subclass of
524
+ :class:`pandas.api.extensions.ExtensionDtype`.
525
+
514
526
Returns
515
527
-------
516
528
numpy.dtype or DatetimeTZDtype
Original file line number Diff line number Diff line change @@ -107,6 +107,28 @@ def wrapper(self, other):
107
107
108
108
109
109
class TimedeltaArray (dtl .DatetimeLikeArrayMixin , dtl .TimelikeOps ):
110
+ """
111
+ Pandas ExtensionArray for timedelta data.
112
+
113
+ .. versionadded :: 0.24.0
114
+
115
+ .. warning::
116
+
117
+ TimedeltaArray is currently experimental, and its API may change
118
+ without warning. In particular, :meth:`TimedeltaArray.dtype` is
119
+ expected to change to be an ``ExtensionDtype``.
120
+
121
+ Parameters
122
+ ----------
123
+ values : array-like
124
+ The timedelta data.
125
+
126
+ dtype : numpy.dtype
127
+ Currently, only ``numpy.dtype("timedelta64[ns]")`` is accepted.
128
+ freq : Offset, optional
129
+ copy : bool, default False
130
+ Whether to copy the underlying array of data.
131
+ """
110
132
_typ = "timedeltaarray"
111
133
_scalar_type = Timedelta
112
134
__array_priority__ = 1000
@@ -128,6 +150,19 @@ def _box_func(self):
128
150
129
151
@property
130
152
def dtype (self ):
153
+ """
154
+ The dtype for the TimedeltaArray.
155
+
156
+ .. warning::
157
+
158
+ A future version of pandas will change dtype to be an instance
159
+ of a :class:`pandas.api.extensions.ExtensionDtype` subclass,
160
+ not a ``numpy.dtype``.
161
+
162
+ Returns
163
+ -------
164
+ numpy.dtype
165
+ """
131
166
return _TD_DTYPE
132
167
133
168
# ----------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments