2
2
3
3
.. _api.arrays :
4
4
5
- =============
6
- pandas arrays
7
- =============
5
+ ======================================
6
+ pandas arrays, scalars, and data types
7
+ ======================================
8
8
9
9
.. currentmodule :: pandas
10
10
@@ -141,11 +141,11 @@ Methods
141
141
Timestamp.weekday
142
142
143
143
A collection of timestamps may be stored in a :class: `arrays.DatetimeArray `.
144
- For timezone-aware data, the ``.dtype `` of a `` DatetimeArray ` ` is a
144
+ For timezone-aware data, the ``.dtype `` of a :class: ` arrays. DatetimeArray ` is a
145
145
:class: `DatetimeTZDtype `. For timezone-naive data, ``np.dtype("datetime64[ns]") ``
146
146
is used.
147
147
148
- If the data are tz -aware, then every value in the array must have the same timezone.
148
+ If the data are timezone -aware, then every value in the array must have the same timezone.
149
149
150
150
.. autosummary ::
151
151
:toctree: api/
@@ -206,7 +206,7 @@ Methods
206
206
Timedelta.to_numpy
207
207
Timedelta.total_seconds
208
208
209
- A collection of timedeltas may be stored in a :class: `TimedeltaArray `.
209
+ A collection of :class: ` Timedelta ` may be stored in a :class: `TimedeltaArray `.
210
210
211
211
.. autosummary ::
212
212
:toctree: api/
@@ -267,8 +267,8 @@ Methods
267
267
Period.strftime
268
268
Period.to_timestamp
269
269
270
- A collection of timedeltas may be stored in a :class: `arrays.PeriodArray `.
271
- Every period in a `` PeriodArray ` ` must have the same ``freq ``.
270
+ A collection of :class: ` Period ` may be stored in a :class: `arrays.PeriodArray `.
271
+ Every period in a :class: ` arrays. PeriodArray ` must have the same ``freq ``.
272
272
273
273
.. autosummary ::
274
274
:toctree: api/
@@ -383,8 +383,8 @@ Categorical data
383
383
----------------
384
384
385
385
pandas defines a custom data type for representing data that can take only a
386
- limited, fixed set of values. The dtype of a `` Categorical ` ` can be described by
387
- a :class: `pandas.api.types. CategoricalDtype `.
386
+ limited, fixed set of values. The dtype of a :class: ` Categorical ` can be described by
387
+ a :class: `CategoricalDtype `.
388
388
389
389
.. autosummary ::
390
390
:toctree: api/
@@ -414,7 +414,7 @@ have the categories and integer codes already:
414
414
415
415
Categorical.from_codes
416
416
417
- The dtype information is available on the `` Categorical ` `
417
+ The dtype information is available on the :class: ` Categorical `
418
418
419
419
.. autosummary ::
420
420
:toctree: api/
@@ -425,21 +425,21 @@ The dtype information is available on the ``Categorical``
425
425
Categorical.codes
426
426
427
427
``np.asarray(categorical) `` works by implementing the array interface. Be aware, that this converts
428
- the Categorical back to a NumPy array, so categories and order information is not preserved!
428
+ the :class: ` Categorical ` back to a NumPy array, so categories and order information is not preserved!
429
429
430
430
.. autosummary ::
431
431
:toctree: api/
432
432
433
433
Categorical.__array__
434
434
435
- A `` Categorical `` can be stored in a `` Series `` or `` DataFrame ` `.
435
+ A :class: ` Categorical ` can be stored in a :class: ` Series ` or :class: ` DataFrame `.
436
436
To create a Series of dtype ``category ``, use ``cat = s.astype(dtype) `` or
437
437
``Series(..., dtype=dtype) `` where ``dtype `` is either
438
438
439
439
* the string ``'category' ``
440
- * an instance of :class: `~pandas.api.types. CategoricalDtype `.
440
+ * an instance of :class: `CategoricalDtype `.
441
441
442
- If the Series is of dtype `` CategoricalDtype ` `, ``Series.cat `` can be used to change the categorical
442
+ If the :class: ` Series ` is of dtype :class: ` CategoricalDtype `, ``Series.cat `` can be used to change the categorical
443
443
data. See :ref: `api.series.cat ` for more.
444
444
445
445
.. _api.arrays.sparse :
@@ -488,7 +488,7 @@ we recommend using :class:`StringDtype` (with the alias ``"string"``).
488
488
489
489
StringDtype
490
490
491
- The ``Series.str `` accessor is available for `` Series ` ` backed by a :class: `arrays.StringArray `.
491
+ The ``Series.str `` accessor is available for :class: ` Series ` backed by a :class: `arrays.StringArray `.
492
492
See :ref: `api.series.str ` for more.
493
493
494
494
@@ -498,7 +498,7 @@ Boolean data with missing values
498
498
--------------------------------
499
499
500
500
The boolean dtype (with the alias ``"boolean" ``) provides support for storing
501
- boolean data (True, False values ) with missing values, which is not possible
501
+ boolean data (`` True ``, `` False `` ) with missing values, which is not possible
502
502
with a bool :class: `numpy.ndarray `.
503
503
504
504
.. autosummary ::
0 commit comments