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

DOC: use intersphinx mapping in pandas-compat ext #15846

Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion docs/cudf/source/developer_guide/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ The directive should be used inside docstrings like so:
Docstring body

.. pandas-compat::
**$API_NAME**
:meth:`pandas.DataFrame.METHOD`

Explanation of differences
```
Expand Down
5 changes: 3 additions & 2 deletions python/cudf/cudf/core/column/lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,10 @@ def sort_values(
dtype: list

.. pandas-compat::
**ListMethods.sort_values**
:meth:`pandas.Series.list.sort_values`

The ``inplace`` and ``kind`` arguments are currently not supported.
This method does not exist in pandas but it can be run
as ``...``.
raybellwaves marked this conversation as resolved.
Show resolved Hide resolved
"""
if inplace:
raise NotImplementedError("`inplace` not currently implemented.")
Expand Down
16 changes: 8 additions & 8 deletions python/cudf/cudf/core/column/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ def extract(
dtype: object

.. pandas-compat::
**StringMethods.extract**
:meth:`pandas.Series.str.extract`

The `flags` parameter currently only supports re.DOTALL and
re.MULTILINE.
Expand Down Expand Up @@ -747,7 +747,7 @@ def contains(
dtype: bool

.. pandas-compat::
**StringMethods.contains**
:meth:`pandas.Series.str.contains`

The parameters `case` and `na` are not yet supported and will
raise a NotImplementedError if anything other than the default
Expand Down Expand Up @@ -983,7 +983,7 @@ def replace(
dtype: object

.. pandas-compat::
**StringMethods.replace**
:meth:`pandas.Series.str.replace`

The parameters `case` and `flags` are not yet supported and will
raise a `NotImplementedError` if anything other than the default
Expand Down Expand Up @@ -2814,7 +2814,7 @@ def partition(self, sep: str = " ", expand: bool = True) -> SeriesOrIndex:
)

.. pandas-compat::
**StringMethods.partition**
:meth:`pandas.Series.str.partition`

The parameter `expand` is not yet supported and will raise a
`NotImplementedError` if anything other than the default
Expand Down Expand Up @@ -3538,7 +3538,7 @@ def count(self, pat: str, flags: int = 0) -> SeriesOrIndex:
Index([0, 0, 2, 1], dtype='int64')

.. pandas-compat::
**StringMethods.count**
:meth:`pandas.Series.str.count`

- `flags` parameter currently only supports re.DOTALL
and re.MULTILINE.
Expand Down Expand Up @@ -3618,7 +3618,7 @@ def findall(self, pat: str, flags: int = 0) -> SeriesOrIndex:
dtype: list

.. pandas-compat::
**StringMethods.findall**
:meth:`pandas.Series.str.findall`

The `flags` parameter currently only supports re.DOTALL and
re.MULTILINE.
Expand Down Expand Up @@ -3822,7 +3822,7 @@ def endswith(self, pat: str) -> SeriesOrIndex:
dtype: bool

.. pandas-compat::
**StringMethods.endswith**
:meth:`pandas.Series.str.endswith`

`na` parameter is not yet supported, as cudf uses
native strings instead of Python objects.
Expand Down Expand Up @@ -4275,7 +4275,7 @@ def match(
dtype: bool

.. pandas-compat::
**StringMethods.match**
:meth:`pandas.Series.str.match`

Parameters `case` and `na` are currently not supported.
The `flags` parameter currently only supports re.DOTALL and
Expand Down
32 changes: 16 additions & 16 deletions python/cudf/cudf/core/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2768,7 +2768,7 @@ def reindex(
Chrome 200 0.02

.. pandas-compat::
**DataFrame.reindex**
:meth:`pandas.DataFrame.reindex`

Note: One difference from Pandas is that ``NA`` is used for rows
that do not match, rather than ``NaN``. One side effect of this is
Expand Down Expand Up @@ -3341,7 +3341,7 @@ def diff(self, periods=1, axis=0):
5 2 5 20

.. pandas-compat::
**DataFrame.diff**
:meth:`pandas.DataFrame.diff`

Diff currently only supports numeric dtype columns.
"""
Expand Down Expand Up @@ -3546,7 +3546,7 @@ def rename(
30 3 6

.. pandas-compat::
**DataFrame.rename**
:meth:`pandas.DataFrame.rename`

* Not Supporting: level

Expand Down Expand Up @@ -3657,7 +3657,7 @@ def agg(self, aggs, axis=None):
``DataFrame`` is returned.

.. pandas-compat::
**DataFrame.agg**
:meth:`pandas.DataFrame.agg`

* Not supporting: ``axis``, ``*args``, ``**kwargs``

Expand Down Expand Up @@ -3830,7 +3830,7 @@ def nlargest(self, n, columns, keep="first"):
Brunei 434000 12128 BN

.. pandas-compat::
**DataFrame.nlargest**
:meth:`pandas.DataFrame.nlargest`

- Only a single column is supported in *columns*
"""
Expand Down Expand Up @@ -3902,7 +3902,7 @@ def nsmallest(self, n, columns, keep="first"):
Nauru 337000 182 NR

.. pandas-compat::
**DataFrame.nsmallest**
:meth:`pandas.DataFrame.nsmallest`

- Only a single column is supported in *columns*
"""
Expand Down Expand Up @@ -3983,7 +3983,7 @@ def transpose(self):
a new (ncol x nrow) dataframe. self is (nrow x ncol)

.. pandas-compat::
**DataFrame.transpose, DataFrame.T**
:meth:`pandas.DataFrame.transpose`, :meth:`pandas.DataFrame.T`

Not supporting *copy* because default and only behavior is
copy=True
Expand Down Expand Up @@ -4174,7 +4174,7 @@ def merge(
from both sides.

.. pandas-compat::
**DataFrame.merge**
:meth:`pandas.DataFrame.merge`

DataFrames merges in cuDF result in non-deterministic row
ordering.
Expand Down Expand Up @@ -4249,7 +4249,7 @@ def join(
joined : DataFrame

.. pandas-compat::
**DataFrame.join**
:meth:`pandas.DataFrame.join`

- *other* must be a single DataFrame for now.
- *on* is not supported yet due to lack of multi-index support.
Expand Down Expand Up @@ -4371,7 +4371,7 @@ def query(self, expr, local_dict=None):
1 2018-10-08

.. pandas-compat::
**DataFrame.query**
:meth:`pandas.DataFrame.query`

One difference from pandas is that ``query`` currently only
supports numeric, datetime, timedelta, or bool dtypes.
Expand Down Expand Up @@ -5433,7 +5433,7 @@ def from_arrow(cls, table):
2 3 6

.. pandas-compat::
**DataFrame.from_arrow**
:meth:`pandas.DataFrame.from_arrow`

- Does not support automatically setting index column(s) similar
to how ``to_pandas`` works for PyArrow Tables.
Expand Down Expand Up @@ -5865,7 +5865,7 @@ def quantile(
0.5 2.5 55.0

.. pandas-compat::
**DataFrame.quantile**
:meth:`pandas.DataFrame.quantile`

One notable difference from Pandas is when DataFrame is of
non-numeric types and result is expected to be a Series in case of
Expand Down Expand Up @@ -6155,7 +6155,7 @@ def count(self, axis=0, numeric_only=False):
dtype: int64

.. pandas-compat::
**DataFrame.count**
:meth:`pandas.DataFrame.count`

Parameters currently not supported are `axis` and `numeric_only`.
"""
Expand Down Expand Up @@ -6393,7 +6393,7 @@ def mode(self, axis=0, numeric_only=False, dropna=True):
1 <NA> 2.0

.. pandas-compat::
**DataFrame.mode**
:meth:`pandas.DataFrame.transpose`

``axis`` parameter is currently not supported.
"""
Expand Down Expand Up @@ -7583,7 +7583,7 @@ def interleave_columns(self):
The interleaved columns as a single column

.. pandas-compat::
**DataFrame.interleave_columns**
:meth:`pandas.DataFrame.interleave_columns`

This method does not exist in pandas but it can be run
as ``pd.Series(np.vstack(df.to_numpy()).reshape((-1,)))``.
Expand Down Expand Up @@ -7685,7 +7685,7 @@ def eval(self, expr: str, inplace: bool = False, **kwargs):
4 5 2 7 3

.. pandas-compat::
**DataFrame.eval**
:meth:`pandas.DataFrame.eval`

* Additional kwargs are not supported.
* Bitwise and logical operators are not dtype-dependent.
Expand Down
10 changes: 5 additions & 5 deletions python/cudf/cudf/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def where(self, cond, other=None, inplace: bool = False) -> Optional[Self]:
dtype: int64

.. pandas-compat::
**DataFrame.where, Series.where**
:meth:`pandas.DataFrame.where`, :meth:`pandas.Series.where`

Note that ``where`` treats missing values as falsy,
in parallel with pandas treatment of nullable data:
Expand Down Expand Up @@ -1730,7 +1730,7 @@ def min(
1

.. pandas-compat::
**DataFrame.min, Series.min**
:meth:`pandas.DataFrame.min`, :meth:`pandas.Series.min`

Parameters currently not supported are `level`, `numeric_only`.
"""
Expand Down Expand Up @@ -1778,7 +1778,7 @@ def max(
dtype: int64

.. pandas-compat::
**DataFrame.max, Series.max**
:meth:`pandas.DataFrame.max`, :meth:`pandas.Series.max`

Parameters currently not supported are `level`, `numeric_only`.
"""
Expand Down Expand Up @@ -1831,7 +1831,7 @@ def all(self, axis=0, skipna=True, **kwargs):
dtype: bool

.. pandas-compat::
**DataFrame.all, Series.all**
:meth:`pandas.DataFrame.all`, :meth:`pandas.Series.all`

Parameters currently not supported are `axis`, `bool_only`,
`level`.
Expand Down Expand Up @@ -1884,7 +1884,7 @@ def any(self, axis=0, skipna=True, **kwargs):
dtype: bool

.. pandas-compat::
**DataFrame.any, Series.any**
:meth:`pandas.DataFrame.any`, :meth:`pandas.Series.any`

Parameters currently not supported are `axis`, `bool_only`,
`level`.
Expand Down
9 changes: 6 additions & 3 deletions python/cudf/cudf/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,8 @@ def _reduce(
Computed {op} of values within each group.

.. pandas-compat::
**{cls}.{op}**
:meth:`pandas.core.groupby.DataFrameGroupBy.{op}`,
:meth:`pandas.core.groupby.SeriesGroupBy.{op}
raybellwaves marked this conversation as resolved.
Show resolved Hide resolved

The numeric_only, min_count
"""
Expand Down Expand Up @@ -1476,7 +1477,8 @@ def mult(df):
6 2 6 12

.. pandas-compat::
**GroupBy.apply**
:meth:`pandas.core.groupby.DataFrameGroupBy.apply`,
:meth:`pandas.core.groupby.SeriesGroupBy.apply

cuDF's ``groupby.apply`` is limited compared to pandas.
In some situations, Pandas returns the grouped keys as part of
Expand Down Expand Up @@ -2352,7 +2354,8 @@ def shift(self, periods=1, freq=None, axis=0, fill_value=None):
Object shifted within each group.

.. pandas-compat::
**GroupBy.shift**
:meth:`pandas.core.groupby.DataFrameGroupBy.shift`,
:meth:`pandas.core.groupby.SeriesGroupBy.shift

Parameter ``freq`` is unsupported.
"""
Expand Down
Loading
Loading