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

Convert Notes (NEW) #12691

Closed
wants to merge 2 commits into from
Closed
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
10 changes: 5 additions & 5 deletions python/cudf/cudf/core/column/lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,11 +642,6 @@ def sort_values(
-------
Series or Index with each list sorted

Notes
-----
Difference from pandas:
* Not supporting: `inplace`, `kind`

Examples
--------
>>> s = cudf.Series([[4, 2, None, 9], [8, 8, 2], [2, 1]])
Expand All @@ -655,6 +650,11 @@ def sort_values(
1 [2.0, 8.0, 8.0]
2 [1.0, 2.0]
dtype: list

.. pandas-compat::
**list.ListMethods.sort_values**

The ``inplace`` and ``kind`` arguments are currently not supported.
"""
if inplace:
raise NotImplementedError("`inplace` not currently implemented.")
Expand Down
98 changes: 52 additions & 46 deletions python/cudf/cudf/core/column/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,6 @@ def extract(
for each group. If `expand=False` and `pat` has only one capture
group, then return a Series/Index.

Notes
-----
The `flags` parameter currently only supports re.DOTALL and
re.MULTILINE.

Examples
--------
>>> import cudf
Expand All @@ -627,6 +622,12 @@ def extract(
1 2
2 <NA>
dtype: object

.. pandas-compat::
**StringMethods.extract**

The `flags` parameter currently only supports re.DOTALL and
re.MULTILINE.
""" # noqa W605
if not _is_supported_regex_flags(flags):
raise NotImplementedError(
Expand Down Expand Up @@ -674,14 +675,6 @@ def contains(
pattern is contained within the string of each element of the
Series/Index.

Notes
-----
The parameters `case` and `na` are not yet supported and will
raise a NotImplementedError if anything other than the default
value is set.
The `flags` parameter currently only supports re.DOTALL and
re.MULTILINE.

Examples
--------
>>> import cudf
Expand Down Expand Up @@ -755,6 +748,15 @@ def contains(
3 True
4 <NA>
dtype: bool

.. pandas-compat::
**StringMethods.contains**

The parameters `case` and `na` are not yet supported and will
raise a NotImplementedError if anything other than the default
value is set.
The `flags` parameter currently only supports re.DOTALL and
re.MULTILINE.
""" # noqa W605
if case is not True:
raise NotImplementedError("`case` parameter is not yet supported")
Expand Down Expand Up @@ -946,12 +948,6 @@ def replace(
A copy of the object with all matching occurrences of pat replaced
by repl.

Notes
-----
The parameters `case` and `flags` are not yet supported and will raise
a `NotImplementedError` if anything other than the default value
is set.

Examples
--------
>>> import cudf
Expand Down Expand Up @@ -981,6 +977,13 @@ def replace(
1 fuz
2 <NA>
dtype: object

.. pandas-compat::
**StringMethods.replace**

The parameters `case` and `flags` are not yet supported and will raise
a `NotImplementedError` if anything other than the default value
is set.
"""
if case is not None:
raise NotImplementedError("`case` parameter is not yet supported")
Expand Down Expand Up @@ -2767,11 +2770,6 @@ def partition(self, sep: str = " ", expand: bool = True) -> SeriesOrIndex:
DataFrame or MultiIndex
Returns a DataFrame / MultiIndex

Notes
-----
The parameter `expand` is not yet supported and will raise a
`NotImplementedError` if anything other than the default value is set.

See Also
--------
rpartition
Expand Down Expand Up @@ -2813,6 +2811,12 @@ def partition(self, sep: str = " ", expand: bool = True) -> SeriesOrIndex:
MultiIndex([('X', ' ', '123'),
('Y', ' ', '999')],
)

.. pandas-compat::
**StringMethods.partition**

The parameter `expand` is not yet supported and will raise a
`NotImplementedError` if anything other than the default value is set.
"""
if expand is not True:
raise NotImplementedError(
Expand Down Expand Up @@ -3500,11 +3504,11 @@ def count(self, pat: str, flags: int = 0) -> SeriesOrIndex:

Notes
-----
- `flags` parameter currently only supports re.DOTALL
and re.MULTILINE.
- Some characters need to be escaped when passing
in pat. e.g. ``'$'`` has a special meaning in regex
and must be escaped when finding this literal character.
- `flags` parameter currently only supports re.DOTALL
and re.MULTILINE.
- Some characters need to be escaped when passing
in pat. e.g. ``'$'`` has a special meaning in regex
and must be escaped when finding this literal character.

Examples
--------
Expand Down Expand Up @@ -3568,11 +3572,6 @@ def findall(self, pat: str, flags: int = 0) -> SeriesOrIndex:
All non-overlapping matches of pattern or
regular expression in each string of this Series/Index.

Notes
-----
The `flags` parameter currently only supports re.DOTALL and
re.MULTILINE.

Examples
--------
>>> import cudf
Expand Down Expand Up @@ -3613,6 +3612,12 @@ def findall(self, pat: str, flags: int = 0) -> SeriesOrIndex:
1 []
2 [b, b]
dtype: list

.. pandas-compat::
**StringMethods.findall**

The `flags` parameter currently only supports re.DOTALL and
re.MULTILINE.
"""
if isinstance(pat, re.Pattern):
flags = pat.flags & ~re.U
Expand Down Expand Up @@ -3795,11 +3800,6 @@ def endswith(self, pat: str) -> SeriesOrIndex:
A Series of booleans indicating whether the given
pattern matches the end of each string element.

Notes
-----
`na` parameter is not yet supported, as cudf uses
native strings instead of Python objects.

Examples
--------
>>> import cudf
Expand All @@ -3816,6 +3816,12 @@ def endswith(self, pat: str) -> SeriesOrIndex:
2 False
3 <NA>
dtype: bool

.. pandas-compat::
**StringMethods.endswith**

`na` parameter is not yet supported, as cudf uses
native strings instead of Python objects.
"""
if pat is None:
raise TypeError(
Expand Down Expand Up @@ -4241,13 +4247,6 @@ def match(
-------
Series or Index of boolean values.

Notes
-----
Parameters `case` and `na` are currently not supported.
The `flags` parameter currently only supports re.DOTALL and
re.MULTILINE.


Examples
--------
>>> import cudf
Expand All @@ -4268,6 +4267,13 @@ def match(
1 True
2 True
dtype: bool

.. pandas-compat::
**StringMethods.match**

Parameters `case` and `na` are currently not supported.
The `flags` parameter currently only supports re.DOTALL and
re.MULTILINE.
"""
if case is not True:
raise NotImplementedError("`case` parameter is not yet supported")
Expand Down
Loading