-
Notifications
You must be signed in to change notification settings - Fork 891
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor ColumnMethods and its subclasses to remove
column
argument…
… and require `parent` argument (#8306) Prior to this PR, ColumnMethods takes a `column` argument as well as an optional `parent` argument. - When passed only a `column` argument, its methods return Columns. We have made use of this internally to do certain operations on Columns. - When passed a `parent` argument, its methods return objects of the type of the `parent`. This enables us to use the same class to implement accessor methods for both Series and Index. This PR makes it so that we only accept (and now require) a `parent` argument, simplifying the class and its usage. All instances of `ColumnMethods` being used internally have been replaced. Part of the [Array refactor](#8273). Authors: - Ashwin Srinath (https://github.com/shwina) Approvers: - https://github.com/brandon-b-miller - Michael Wang (https://github.com/isVoid) URL: #8306
- Loading branch information
Showing
20 changed files
with
668 additions
and
618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
from cudf._lib.nvtext.edit_distance import edit_distance, edit_distance_matrix | ||
from cudf._lib.nvtext.generate_ngrams import ( | ||
generate_character_ngrams, | ||
generate_ngrams, | ||
) | ||
from cudf._lib.nvtext.ngrams_tokenize import ngrams_tokenize | ||
from cudf._lib.nvtext.normalize import normalize_characters, normalize_spaces | ||
from cudf._lib.nvtext.replace import filter_tokens, replace_tokens | ||
from cudf._lib.nvtext.stemmer import ( | ||
LetterType, | ||
is_letter, | ||
is_letter_multi, | ||
porter_stemmer_measure, | ||
) | ||
from cudf._lib.nvtext.subword_tokenize import subword_tokenize_vocab_file | ||
from cudf._lib.nvtext.tokenize import ( | ||
_count_tokens_column, | ||
_count_tokens_scalar, | ||
_tokenize_column, | ||
_tokenize_scalar, | ||
character_tokenize, | ||
detokenize, | ||
) | ||
from cudf._lib.strings.attributes import ( | ||
code_points, | ||
count_bytes, | ||
count_characters, | ||
) | ||
from cudf._lib.strings.capitalize import capitalize, title | ||
from cudf._lib.strings.case import swapcase, to_lower, to_upper | ||
from cudf._lib.strings.char_types import ( | ||
filter_alphanum, | ||
is_alnum, | ||
is_alpha, | ||
is_decimal, | ||
is_digit, | ||
is_lower, | ||
is_numeric, | ||
is_space, | ||
is_upper, | ||
) | ||
from cudf._lib.strings.combine import ( | ||
concatenate, | ||
join, | ||
join_lists_with_column, | ||
join_lists_with_scalar, | ||
) | ||
from cudf._lib.strings.contains import contains_re, count_re, match_re | ||
from cudf._lib.strings.convert.convert_fixed_point import to_decimal | ||
from cudf._lib.strings.convert.convert_floats import is_float | ||
from cudf._lib.strings.convert.convert_integers import is_integer | ||
from cudf._lib.strings.convert.convert_urls import url_decode, url_encode | ||
from cudf._lib.strings.extract import extract | ||
from cudf._lib.strings.find import ( | ||
contains, | ||
contains_multiple, | ||
endswith, | ||
endswith_multiple, | ||
find, | ||
rfind, | ||
startswith, | ||
startswith_multiple, | ||
) | ||
from cudf._lib.strings.findall import findall | ||
from cudf._lib.strings.json import get_json_object | ||
from cudf._lib.strings.padding import PadSide, center, ljust, pad, rjust, zfill | ||
from cudf._lib.strings.replace import ( | ||
insert, | ||
replace, | ||
replace_multi, | ||
slice_replace, | ||
) | ||
from cudf._lib.strings.replace_re import ( | ||
replace_multi_re, | ||
replace_re, | ||
replace_with_backrefs, | ||
) | ||
from cudf._lib.strings.split.partition import partition, rpartition | ||
from cudf._lib.strings.split.split import ( | ||
rsplit, | ||
rsplit_record, | ||
split, | ||
split_record, | ||
) | ||
from cudf._lib.strings.strip import lstrip, rstrip, strip | ||
from cudf._lib.strings.substring import get, slice_from, slice_strings | ||
from cudf._lib.strings.translate import filter_characters, translate | ||
from cudf._lib.strings.wrap import wrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.