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] Fix some docstrings formatting #10660

Merged
merged 4 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions docs/cudf/source/api_docs/dataframe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ Computations / descriptive stats
DataFrame.round
DataFrame.skew
DataFrame.sum
DataFrame.sum_of_squares
DataFrame.std
DataFrame.var
DataFrame.nunique
Expand Down Expand Up @@ -248,9 +249,11 @@ Serialization / IO / conversion
DataFrame.to_dlpack
DataFrame.to_parquet
DataFrame.to_csv
DataFrame.to_cupy
DataFrame.to_hdf
DataFrame.to_dict
DataFrame.to_json
DataFrame.to_numpy
DataFrame.to_pandas
DataFrame.to_feather
DataFrame.to_records
Expand Down
2 changes: 2 additions & 0 deletions docs/cudf/source/api_docs/index_objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ Conversion

Index.astype
Index.to_arrow
Index.to_cupy
Index.to_list
Index.to_numpy
Index.to_series
Index.to_frame
Index.to_pandas
Expand Down
2 changes: 2 additions & 0 deletions docs/cudf/source/api_docs/series.rst
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,12 @@ Serialization / IO / conversion
:toctree: api/

Series.to_arrow
Series.to_cupy
Series.to_dlpack
Series.to_frame
Series.to_hdf
Series.to_json
Series.to_numpy
Series.to_pandas
Series.to_string
Series.from_arrow
Expand Down
1 change: 0 additions & 1 deletion docs/cudf/source/api_docs/string_handling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ strings and apply several methods to it. These can be accessed like
rsplit
startswith
strip
subword_tokenize
swapcase
title
token_count
Expand Down
1 change: 1 addition & 0 deletions docs/cudf/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def process_class_docstrings(app, what, name, obj, options, lines):
lines[:] = lines[:cut_index]


nitpick_ignore = [("py:class", "SeriesOrIndex"),]


def setup(app):
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/_base_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_level_values(self, level):

See Also
--------
cudf.core.multiindex.MultiIndex.get_level_values : Get values for
cudf.MultiIndex.get_level_values : Get values for
a level of a MultiIndex.

Notes
Expand Down
1 change: 1 addition & 0 deletions python/cudf/cudf/core/cut.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def cut(
Categorical and Series (with Categorical dtype). If True,
the resulting categorical will be ordered. If False, the resulting
categorical will be unordered (labels must be provided).

Returns
-------
out : CategoricalIndex
Expand Down
2 changes: 2 additions & 0 deletions python/cudf/cudf/core/indexed_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,7 @@ def add_prefix(self, prefix):
Examples
--------
**Series**

>>> s = cudf.Series([1, 2, 3, 4])
>>> s
0 1
Expand All @@ -1006,6 +1007,7 @@ def add_prefix(self, prefix):
dtype: int64

**DataFrame**

>>> df = cudf.DataFrame({'A': [1, 2, 3, 4], 'B': [3, 4, 5, 6]})
>>> df
A B
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/tools/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def to_numeric(arg, errors="raise", downcast=None):
otherwise ndarray

Notes
-------
-----
An important difference from pandas is that this function does not accept
mixed numeric/non-numeric type sequences. For example ``[1, 'a']``.
A ``TypeError`` will be raised when such input is received, regardless of
Expand Down