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

[REVIEW] Add dtype docs pages and docstrings for cudf specific dtypes #11974

Merged
merged 8 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from 6 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
19 changes: 19 additions & 0 deletions docs/cudf/source/user_guide/cudf.CategoricalDtype.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cudf.CategoricalDtype
=====================

.. currentmodule:: cudf

.. autoclass:: CategoricalDtype
:members: categories, ordered, from_pandas, to_pandas



..
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
.. autosummary::
:toctree:

CategoricalDtype.categories
CategoricalDtype.ordered
CategoricalDtype.from_pandas
CategoricalDtype.to_pandas
vyasr marked this conversation as resolved.
Show resolved Hide resolved
20 changes: 20 additions & 0 deletions docs/cudf/source/user_guide/cudf.Decimal128Dtype.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cudf.Decimal128Dtype
===================

.. currentmodule:: cudf

.. autoclass:: Decimal128Dtype
:members: precision, scale, itemsize, to_arrow, from_arrow



..
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
.. autosummary::
:toctree:

Decimal128Dtype.precision
Decimal128Dtype.scale
Decimal128Dtype.itemsize
Decimal128Dtype.to_arrow
Decimal128Dtype.from_arrow
20 changes: 20 additions & 0 deletions docs/cudf/source/user_guide/cudf.Decimal32Dtype.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cudf.Decimal32Dtype
===================

.. currentmodule:: cudf

.. autoclass:: Decimal32Dtype
:members: precision, scale, itemsize, to_arrow, from_arrow



..
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
.. autosummary::
:toctree:

Decimal32Dtype.precision
Decimal32Dtype.scale
Decimal32Dtype.itemsize
Decimal32Dtype.to_arrow
Decimal32Dtype.from_arrow
20 changes: 20 additions & 0 deletions docs/cudf/source/user_guide/cudf.Decimal64Dtype.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cudf.Decimal64Dtype
===================

.. currentmodule:: cudf

.. autoclass:: Decimal64Dtype
:members: precision, scale, itemsize, to_arrow, from_arrow



..
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
.. autosummary::
:toctree:

Decimal64Dtype.precision
Decimal64Dtype.scale
Decimal64Dtype.itemsize
Decimal64Dtype.to_arrow
Decimal64Dtype.from_arrow
19 changes: 19 additions & 0 deletions docs/cudf/source/user_guide/cudf.ListDtype.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cudf.ListDtype
==============

.. currentmodule:: cudf

.. autoclass:: ListDtype
:members: element_type, leaf_type, from_arrow, to_arrow



..
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
.. autosummary::
:toctree:

ListDtype.element_type
ListDtype.leaf_type
ListDtype.from_arrow
ListDtype.to_arrow
18 changes: 18 additions & 0 deletions docs/cudf/source/user_guide/cudf.StructDtype.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cudf.StructDtype
================

.. currentmodule:: cudf

.. autoclass:: StructDtype
:members: fields, from_arrow, to_arrow



..
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
.. autosummary::
:toctree:

StructDtype.fields
StructDtype.from_arrow
StructDtype.to_arrow
24 changes: 12 additions & 12 deletions docs/cudf/source/user_guide/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ All data types in cuDF are [nullable](missing-data).

<div class="special-table">

| Kind of data | Data type(s) |
|----------------------|---------------------------------------------------------------------------------|
| Signed integer | `'int8'`, `'int16'`, `'int32'`, `'int64'` |
| Unsigned integer | `'uint32'`, `'uint64'` |
| Floating-point | `'float32'`, `'float64'` |
| Datetime | `'datetime64[s]'`, `'datetime64[ms]'`, `'datetime64['us']`, `'datetime64[ns]'` |
| Timedelta (duration) | `'timedelta[s]'`, `'timedelta[ms]'`, `'timedelta['us']`, `'timedelta[ns]'` |
| Category | `cudf.CategoricalDtype` |
| String | `'object'` or `'string'` |
| Decimal | `cudf.Decimal32Dtype`, `cudf.Decimal64Dtype`, `cudf.Decimal64Dtype` |
| List | `cudf.ListDtype` |
| Struct | `cudf.StructDtype` |
| Kind of data | Data type(s) |
|----------------------|---------------------------------------------------------------------------------------------------|
| Signed integer | `'int8'`, `'int16'`, `'int32'`, `'int64'` |
| Unsigned integer | `'uint32'`, `'uint64'` |
| Floating-point | `'float32'`, `'float64'` |
| Datetime | `'datetime64[s]'`, `'datetime64[ms]'`, `'datetime64['us']`, `'datetime64[ns]'` |
| Timedelta (duration) | `'timedelta[s]'`, `'timedelta[ms]'`, `'timedelta['us']`, `'timedelta[ns]'` |
| Category | {py:func}`cudf.CategoricalDtype` |
| String | `'object'` or `'string'` |
| Decimal | {py:func}`cudf.Decimal32Dtype`, {py:func}`cudf.Decimal64Dtype`, {py:func}`cudf.Decimal64Dtype` |
| List | {py:func}`cudf.ListDtype` |
| Struct | {py:func}`cudf.StructDtype` |

</div>

Expand Down
Loading