From 064940bf05a36452cd618efcf40658ac24cfb982 Mon Sep 17 00:00:00 2001 From: mikhaylov-yv Date: Sat, 13 Nov 2021 18:41:46 +0300 Subject: [PATCH 1/2] Transferring data from the 6th column to the first. --- doc/source/user_guide/basics.rst | 56 +++++++++++++++++--------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/doc/source/user_guide/basics.rst b/doc/source/user_guide/basics.rst index a589ad96ca7d9..01696fa512192 100644 --- a/doc/source/user_guide/basics.rst +++ b/doc/source/user_guide/basics.rst @@ -2051,32 +2051,36 @@ The following table lists all of pandas extension types. For methods requiring ` arguments, strings can be specified as indicated. See the respective documentation sections for more on each type. -+-------------------+---------------------------+--------------------+-------------------------------+-----------------------------------------+-------------------------------+ -| Kind of Data | Data Type | Scalar | Array | String Aliases | Documentation | -+===================+===========================+====================+===============================+=========================================+===============================+ -| tz-aware datetime | :class:`DatetimeTZDtype` | :class:`Timestamp` | :class:`arrays.DatetimeArray` | ``'datetime64[ns, ]'`` | :ref:`timeseries.timezone` | -+-------------------+---------------------------+--------------------+-------------------------------+-----------------------------------------+-------------------------------+ -| Categorical | :class:`CategoricalDtype` | (none) | :class:`Categorical` | ``'category'`` | :ref:`categorical` | -+-------------------+---------------------------+--------------------+-------------------------------+-----------------------------------------+-------------------------------+ -| period | :class:`PeriodDtype` | :class:`Period` | :class:`arrays.PeriodArray` | ``'period[]'``, | :ref:`timeseries.periods` | -| (time spans) | | | | ``'Period[]'`` | | -+-------------------+---------------------------+--------------------+-------------------------------+-----------------------------------------+-------------------------------+ -| sparse | :class:`SparseDtype` | (none) | :class:`arrays.SparseArray` | ``'Sparse'``, ``'Sparse[int]'``, | :ref:`sparse` | -| | | | | ``'Sparse[float]'`` | | -+-------------------+---------------------------+--------------------+-------------------------------+-----------------------------------------+-------------------------------+ -| intervals | :class:`IntervalDtype` | :class:`Interval` | :class:`arrays.IntervalArray` | ``'interval'``, ``'Interval'``, | :ref:`advanced.intervalindex` | -| | | | | ``'Interval[]'``, | | -| | | | | ``'Interval[datetime64[ns, ]]'``, | | -| | | | | ``'Interval[timedelta64[]]'`` | | -+-------------------+---------------------------+--------------------+-------------------------------+-----------------------------------------+-------------------------------+ -| nullable integer + :class:`Int64Dtype`, ... | (none) | :class:`arrays.IntegerArray` | ``'Int8'``, ``'Int16'``, ``'Int32'``, | :ref:`integer_na` | -| | | | | ``'Int64'``, ``'UInt8'``, ``'UInt16'``, | | -| | | | | ``'UInt32'``, ``'UInt64'`` | | -+-------------------+---------------------------+--------------------+-------------------------------+-----------------------------------------+-------------------------------+ -| Strings | :class:`StringDtype` | :class:`str` | :class:`arrays.StringArray` | ``'string'`` | :ref:`text` | -+-------------------+---------------------------+--------------------+-------------------------------+-----------------------------------------+-------------------------------+ -| Boolean (with NA) | :class:`BooleanDtype` | :class:`bool` | :class:`arrays.BooleanArray` | ``'boolean'`` | :ref:`api.arrays.bool` | -+-------------------+---------------------------+--------------------+-------------------------------+-----------------------------------------+-------------------------------+ ++-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| Kind of Data Documentation | Data Type | Scalar | Array | String Aliases | ++===============================+===============+===========+========+===========+===============================+========================================+ +| tz-aware datetime | :class:`DatetimeTZDtype` | :class:`Timestamp` | :class:`arrays.DatetimeArray` | ``'datetime64[ns, ]'`` | +| :ref:`timeseries.timezone` | | | | | ++-------------------------------+---------------+-----------+--------------------+-------------------------------+----------------------------------------+ +| Categorical | :class:`CategoricalDtype` | (none) | :class:`Categorical` | ``'category'`` | +| :ref:`categorical` | | | | | ++-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| period (time spans) | :class:`PeriodDtype` | :class:`Period` | :class:`arrays.PeriodArray` | ``'period[]'``, | +| :ref:`timeseries.periods` | | | ``'Period[]'`` | | ++-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| sparse | :class:`SparseDtype` | (none) | :class:`arrays.SparseArray` | ``'Sparse'``, ``'Sparse[int]'``, | +| :ref:`sparse` | | | | ``'Sparse[float]'`` | ++-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| intervals | :class:`IntervalDtype` | :class:`Interval` | :class:`arrays.IntervalArray` | ``'interval'``, ``'Interval'``, | +| :ref:`advanced.intervalindex` | | | | ``'Interval[]'``, | +| | | | | ``'Interval[datetime64[ns, ]]'``, | +| | | | | ``'Interval[timedelta64[]]'`` | ++-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| nullable integer | :class:`Int64Dtype`, ... | (none) | :class:`arrays.IntegerArray` | ``'Int8'``, ``'Int16'``, ``'Int32'``, | +| :ref:`integer_na` | | | | ``'Int64'``, ``'UInt8'``, ``'UInt16'``,| +| | | | | ``'UInt32'``, ``'UInt64'`` | ++-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| Strings | :class:`StringDtype` | :class:`str` | :class:`arrays.StringArray` | ``'string'`` | +| :ref:`text` | | | | | ++-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| Boolean (with NA) | :class:`BooleanDtype` | :class:`bool` | :class:`arrays.BooleanArray` | ``'boolean'`` | +| :ref:`api.arrays.bool` | | | | | ++-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ pandas has two ways to store strings. From c34893fcafbd21ca1653ae6c6de1be6e4242cc07 Mon Sep 17 00:00:00 2001 From: mikhaylov-yv Date: Sun, 14 Nov 2021 23:04:30 +0300 Subject: [PATCH 2/2] Combined "Kind of Data" and link to documentation --- doc/source/user_guide/basics.rst | 57 +++++++++++++++----------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/doc/source/user_guide/basics.rst b/doc/source/user_guide/basics.rst index 01696fa512192..40ff1049e5820 100644 --- a/doc/source/user_guide/basics.rst +++ b/doc/source/user_guide/basics.rst @@ -2051,36 +2051,33 @@ The following table lists all of pandas extension types. For methods requiring ` arguments, strings can be specified as indicated. See the respective documentation sections for more on each type. -+-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ -| Kind of Data Documentation | Data Type | Scalar | Array | String Aliases | -+===============================+===============+===========+========+===========+===============================+========================================+ -| tz-aware datetime | :class:`DatetimeTZDtype` | :class:`Timestamp` | :class:`arrays.DatetimeArray` | ``'datetime64[ns, ]'`` | -| :ref:`timeseries.timezone` | | | | | -+-------------------------------+---------------+-----------+--------------------+-------------------------------+----------------------------------------+ -| Categorical | :class:`CategoricalDtype` | (none) | :class:`Categorical` | ``'category'`` | -| :ref:`categorical` | | | | | -+-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ -| period (time spans) | :class:`PeriodDtype` | :class:`Period` | :class:`arrays.PeriodArray` | ``'period[]'``, | -| :ref:`timeseries.periods` | | | ``'Period[]'`` | | -+-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ -| sparse | :class:`SparseDtype` | (none) | :class:`arrays.SparseArray` | ``'Sparse'``, ``'Sparse[int]'``, | -| :ref:`sparse` | | | | ``'Sparse[float]'`` | -+-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ -| intervals | :class:`IntervalDtype` | :class:`Interval` | :class:`arrays.IntervalArray` | ``'interval'``, ``'Interval'``, | -| :ref:`advanced.intervalindex` | | | | ``'Interval[]'``, | -| | | | | ``'Interval[datetime64[ns, ]]'``, | -| | | | | ``'Interval[timedelta64[]]'`` | -+-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ -| nullable integer | :class:`Int64Dtype`, ... | (none) | :class:`arrays.IntegerArray` | ``'Int8'``, ``'Int16'``, ``'Int32'``, | -| :ref:`integer_na` | | | | ``'Int64'``, ``'UInt8'``, ``'UInt16'``,| -| | | | | ``'UInt32'``, ``'UInt64'`` | -+-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ -| Strings | :class:`StringDtype` | :class:`str` | :class:`arrays.StringArray` | ``'string'`` | -| :ref:`text` | | | | | -+-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ -| Boolean (with NA) | :class:`BooleanDtype` | :class:`bool` | :class:`arrays.BooleanArray` | ``'boolean'`` | -| :ref:`api.arrays.bool` | | | | | -+-------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ ++-------------------------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| Kind of Data | Data Type | Scalar | Array | String Aliases | ++=================================================+===============+===========+========+===========+===============================+========================================+ +| :ref:`tz-aware datetime ` | :class:`DatetimeTZDtype` | :class:`Timestamp` | :class:`arrays.DatetimeArray` | ``'datetime64[ns, ]'`` | +| | | | | | ++-------------------------------------------------+---------------+-----------+--------------------+-------------------------------+----------------------------------------+ +| :ref:`Categorical ` | :class:`CategoricalDtype` | (none) | :class:`Categorical` | ``'category'`` | ++-------------------------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| :ref:`period (time spans) ` | :class:`PeriodDtype` | :class:`Period` | :class:`arrays.PeriodArray` | ``'period[]'``, | +| | | | ``'Period[]'`` | | ++-------------------------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| :ref:`sparse ` | :class:`SparseDtype` | (none) | :class:`arrays.SparseArray` | ``'Sparse'``, ``'Sparse[int]'``, | +| | | | | ``'Sparse[float]'`` | ++-------------------------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| :ref:`intervals ` | :class:`IntervalDtype` | :class:`Interval` | :class:`arrays.IntervalArray` | ``'interval'``, ``'Interval'``, | +| | | | | ``'Interval[]'``, | +| | | | | ``'Interval[datetime64[ns, ]]'``, | +| | | | | ``'Interval[timedelta64[]]'`` | ++-------------------------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| :ref:`nullable integer ` | :class:`Int64Dtype`, ... | (none) | :class:`arrays.IntegerArray` | ``'Int8'``, ``'Int16'``, ``'Int32'``, | +| | | | | ``'Int64'``, ``'UInt8'``, ``'UInt16'``,| +| | | | | ``'UInt32'``, ``'UInt64'`` | ++-------------------------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| :ref:`Strings ` | :class:`StringDtype` | :class:`str` | :class:`arrays.StringArray` | ``'string'`` | ++-------------------------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ +| :ref:`Boolean (with NA) ` | :class:`BooleanDtype` | :class:`bool` | :class:`arrays.BooleanArray` | ``'boolean'`` | ++-------------------------------------------------+---------------------------+--------------------+-------------------------------+----------------------------------------+ pandas has two ways to store strings.