Skip to content

Commit

Permalink
cudf python spell check fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikeyann committed May 16, 2022
1 parent b15ad4d commit 6a441f4
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/column/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __init__(self, parent):
def htoi(self) -> SeriesOrIndex:
"""
Returns integer value represented by each hex string.
String is interpretted to have hex (base-16) characters.
String is interpreted to have hex (base-16) characters.
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/column/timedelta.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def sum(
dtype: Dtype = None,
) -> pd.Timedelta:
return pd.Timedelta(
# Since sum isn't overriden in Numerical[Base]Column, mypy only
# Since sum isn't overridden in Numerical[Base]Column, mypy only
# sees the signature from Reducible (which doesn't have the extra
# parameters from ColumnBase._reduce) so we have to ignore this.
self.as_numerical.sum( # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/cut.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def cut(
labels : array or False, default None
Specifies the labels for the returned bins. Must be the same
length as the resulting bins. If False, returns only integer
indicators of thebins. If True,raises an error. When ordered=False,
indicators of the bins. If True,raises an error. When ordered=False,
labels must be provided.
retbins : bool, default False
Whether to return the bins or not.
Expand Down
12 changes: 6 additions & 6 deletions python/cudf/cudf/core/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def _getitem_tuple_arg(self, arg):
tmp_arg = arg
if is_scalar(arg[0]):
# If a scalar, there is possibility of having duplicates.
# Join would get all the duplicates. So, coverting it to
# Join would get all the duplicates. So, converting it to
# an array kind.
tmp_arg = ([tmp_arg[0]], tmp_arg[1])
if len(tmp_arg[0]) == 0:
Expand Down Expand Up @@ -1099,7 +1099,7 @@ def __setattr__(self, key, col):

except RuntimeError as e:
# TODO: This allows setting properties that are marked as forbidden
# for internal usage. It is necesary because the __getattribute__
# for internal usage. It is necessary because the __getattribute__
# call in the try block will trigger the error. We should see if
# setting these variables can also always be disabled
if "External-only API" not in str(e):
Expand Down Expand Up @@ -1613,7 +1613,7 @@ def _concat(

# Get a list of the combined index and table column indices
indices = list(range(functools.reduce(max, map(len, columns))))
# The position of the first table colum in each
# The position of the first table column in each
# combined index + table columns list
first_data_column_position = len(indices) - len(names)

Expand Down Expand Up @@ -1786,7 +1786,7 @@ def _clean_nulls_from_dataframe(self, df):
def _get_renderable_dataframe(self):
"""
takes rows and columns from pandas settings or estimation from size.
pulls quadrents based off of some known parameters then style for
pulls quadrants based off of some known parameters then style for
multiindex as well producing an efficient representative string
for printing with the dataframe.
"""
Expand Down Expand Up @@ -2909,7 +2909,7 @@ def rename(
Difference from pandas:
* Not supporting: level
Rename will not overwite column names. If a list with duplicates is
Rename will not overwrite column names. If a list with duplicates is
passed, column names will be postfixed with a number.
Examples
Expand Down Expand Up @@ -4506,7 +4506,7 @@ def from_pandas(cls, dataframe, nan_as_null=None):
Parameters
----------
dataframe : Pandas DataFrame object
A Pandads DataFrame object which has to be converted
A Pandas DataFrame object which has to be converted
to cuDF DataFrame.
nan_as_null : bool, Default True
If ``True``, converts ``np.nan`` values to ``null`` values.
Expand Down
6 changes: 3 additions & 3 deletions python/cudf/cudf/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1615,9 +1615,9 @@ def replace(
4 <NA>
dtype: object
If there is a mimatch in types of the values in
If there is a mismatch in types of the values in
``to_replace`` & ``value`` with the actual series, then
cudf exhibits different behaviour with respect to pandas
cudf exhibits different behavior with respect to pandas
and the pairs are ignored silently:
>>> s = cudf.Series(['b', 'a', 'a', 'b', 'a'])
Expand Down Expand Up @@ -2044,7 +2044,7 @@ def searchsorted(
na_position=na_position,
)

# Retrun result as cupy array if the values is non-scalar
# Return result as cupy array if the values is non-scalar
# If values is scalar, result is expected to be scalar.
result = cupy.asarray(outcol.data_array_view)
if scalar_flag:
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/indexed_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,7 @@ def first(self, offset):
Parameters
----------
offset: str
The offset length of the data that will be selected. For intance,
The offset length of the data that will be selected. For instance,
'1M' will display all rows having their index within the first
month.
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/join/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(
Boolean flag indicating the left index column or columns
are to be used as join keys in order.
right_index : bool
Boolean flag indicating the right index column or coumns
Boolean flag indicating the right index column or columns
are to be used as join keys in order.
lhs_is_index : bool
``lhs`` is a ``BaseIndex``
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/multiindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def names(self, value):
# we reconstruct self._data with the names as keys.
# If they are not unique, the keys of self._data
# and self._names will be different, which can lead
# to unexpected behaviour in some cases. This is
# to unexpected behavior in some cases. This is
# definitely buggy, but we can't disallow non-unique
# names either...
self._data = self._data.__class__._create_unsafe(
Expand Down Expand Up @@ -343,7 +343,7 @@ def copy(
deep : Bool (default False)
If True, `._data`, `._levels`, `._codes` will be copied. Ignored if
`levels` or `codes` are specified.
name : object, optional (defulat None)
name : object, optional (default None)
To keep consistent with `Index.copy`, should not be used.
Returns
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/reshape.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def concat(objs, axis=0, join="outer", ignore_index=False, sort=None):
axis=axis,
join=join,
ignore_index=ignore_index,
# Explicitly cast rather than relying on None being falsy.
# Explicitly cast rather than relying on None being false.
sort=bool(sort),
)
return result
Expand Down
8 changes: 4 additions & 4 deletions python/cudf/cudf/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ def has_nulls(self):
Returns
-------
out : bool
If Series has atleast one null value, return True, if not
If Series has at least one null value, return True, if not
return False.
Examples
Expand Down Expand Up @@ -1447,7 +1447,7 @@ def drop_duplicates(self, keep="first", inplace=False, ignore_index=False):
5 hippo
Name: animal, dtype: object
With the `keep` parameter, the selection behaviour of duplicated
With the `keep` parameter, the selection behavior of duplicated
values can be changed. The value 'first' keeps the first
occurrence for each set of duplicated entries.
The default value of keep is 'first'. Note that order of
Expand Down Expand Up @@ -3934,7 +3934,7 @@ def is_quarter_start(self):
Returns
-------
Series
Booleans indicating if dates are the begining of a quarter
Booleans indicating if dates are the beginning of a quarter
Examples
--------
Expand Down Expand Up @@ -4305,7 +4305,7 @@ def strftime(self, date_format, *args, **kwargs):

class TimedeltaProperties:
"""
Accessor object for timedeltalike properties of the Series values.
Accessor object for timedelta-like properties of the Series values.
Returns
-------
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/subword_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def __call__(

truncation = False
warning_msg = (
"When truncation is not True, the behaviour currently differs "
"When truncation is not True, the behavior currently differs "
"from HuggingFace as cudf always returns overflowing tokens"
)
warnings.warn(warning_msg)
Expand All @@ -207,7 +207,7 @@ def __call__(
raise NotImplementedError(error_msg)

stride = max_length - stride
# behaviour varies from subword_tokenize but maps with huggingface
# behavior varies from subword_tokenize but maps with huggingface

input_ids, attention_mask, metadata = cpp_subword_tokenize(
text._column,
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/io/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def _process_dataset(
path = file_fragment.path

# Extract hive-partition keys, and make sure they
# are orederd the same as they are in `partition_categories`
# are ordered the same as they are in `partition_categories`
if partition_categories:
raw_keys = ds._get_partition_keys(
file_fragment.partition_expression
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/testing/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ def assert_column_memory_eq(
"""Assert the memory location and size of `lhs` and `rhs` are equivalent.
Both data pointer and mask pointer are checked. Also recursively check for
children to the same contarints. Also fails check if the number of children
mismatches at any level.
children to the same constraints. Also fails check if the number of
children mismatches at any level.
"""
assert lhs.base_data_ptr == rhs.base_data_ptr
assert lhs.base_mask_ptr == rhs.base_mask_ptr
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/utils/docutils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018, NVIDIA CORPORATION.
# Copyright (c) 2018-2022, NVIDIA CORPORATION.

"""
Helper functions for parameterized docstring
Expand All @@ -20,7 +20,7 @@ def _only_spaces(s):
def docfmt(**kwargs):
"""Format docstring.
Simliar to saving the result of ``__doc__.format(**kwargs)`` as the
Similiar to saving the result of ``__doc__.format(**kwargs)`` as the
function's docstring.
"""
kwargs = {k: v.lstrip() for k, v in kwargs.items()}
Expand Down
2 changes: 1 addition & 1 deletion python/dask_cudf/dask_cudf/io/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def read_parquet(path, columns=None, **kwargs):
"""Read parquet files into a Dask DataFrame
Calls ``dask.dataframe.read_parquet`` with ``engine=CudfEngine``
to cordinate the execution of ``cudf.read_parquet``, and to
to coordinate the execution of ``cudf.read_parquet``, and to
ultimately create a ``dask_cudf.DataFrame`` collection.
See the ``dask.dataframe.read_parquet`` documentation for
Expand Down

0 comments on commit 6a441f4

Please sign in to comment.