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

Add first-class dtype utilities #8308

Merged
merged 31 commits into from
Jun 16, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e5ab00c
Create new types module that aliases pandas.api.types.
vyasr May 19, 2021
5586652
Move is_categorical_dtype to new location.
vyasr May 19, 2021
bfe2723
Move a bunch more functions into the new module.
vyasr May 19, 2021
8727754
Add docstrings and apply pydocstyle.
vyasr May 20, 2021
65e0198
Add tests of is_categorical_dtype.
vyasr May 20, 2021
8b3b822
Add tests of is_numeric_dtype and is_integer_dtype and fix bugs.
vyasr May 20, 2021
52786bb
Test is_integer.
vyasr May 20, 2021
0e852e9
Add more systematic list of test cases.
vyasr May 20, 2021
6f6e05e
Import IntervalDtype into top-level namespace.
vyasr May 20, 2021
0933c13
Test is_string_dtype.
vyasr May 20, 2021
bbfdeae
Test datetime using simple wrapper of pandas.
vyasr May 20, 2021
eb4298e
Use wrapper for is_integer_dtype.
vyasr May 20, 2021
d5648fc
Add tests of cudf types.
vyasr May 20, 2021
a889711
Add explicit test of pandas agreement and do some cleanup.
vyasr May 20, 2021
e154d4e
Simplify is_scalar.
vyasr May 20, 2021
6911063
Address some obvious test failures, either by fixing or with TODOs wh…
vyasr May 20, 2021
5032eef
Clean up some comments.
vyasr May 20, 2021
380f44b
Combine previously introduced types API with current new more compreh…
vyasr Jun 8, 2021
f1b00c5
Import annotations.
vyasr Jun 8, 2021
6b88a23
Define a new function for internal use to distinguish decimals from o…
vyasr Jun 8, 2021
e05c2bc
Fix docstring to satisfy pydocstyle.
vyasr Jun 8, 2021
2c966ed
Partial replacement of usage of pd.api.types.
vyasr Jun 8, 2021
719274d
Simplify is_categorical_dtype.
vyasr Jun 8, 2021
c8b62aa
Change is_scalar to False for 0d arrays, and add a new utility for in…
vyasr Jun 9, 2021
b097c2c
Exclude interval from struct tests for now.
vyasr Jun 9, 2021
7e36d09
Remove more uses of pd.api.types.
vyasr Jun 9, 2021
f63146e
Remove aliasing.
vyasr Jun 9, 2021
afbdfb2
Merge remote-tracking branch 'origin/branch-21.08' into refactor/type…
vyasr Jun 14, 2021
55a47ef
Merge remote-tracking branch 'origin/branch-21.08' into refactor/type…
vyasr Jun 15, 2021
d2b8710
Fix circular import issues.
vyasr Jun 15, 2021
e61765a
Merge branch 'refactor/type_apis' of github.com:vyasr/cudf into refac…
vyasr Jun 15, 2021
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
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/branch-21.08' into refactor/type…
…_apis
  • Loading branch information
vyasr committed Jun 14, 2021
commit afbdfb25a19287737401b398d71ff20fd3a1e616
4 changes: 2 additions & 2 deletions python/cudf/cudf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@
UInt16Index,
UInt32Index,
UInt64Index,
cut,
from_pandas,
interval_range,
merge,
cut,
)
from cudf.core.algorithms import factorize
from cudf.core.dtypes import (
CategoricalDtype,
Decimal64Dtype,
IntervalDtype,
ListDtype,
StructDtype,
IntervalDtype,
)
from cudf.core.groupby import Grouper
from cudf.core.ops import (
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@ def round(self, decimals=0, how="half_even"):
}
elif isinstance(decimals, int):
cols = {
name: col.round(decimals)
name: col.round(decimals, how=how)
if _is_non_decimal_numeric_dtype(col.dtype)
else col.copy(deep=True)
for name, col in self._data.items()
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
from cudf.utils.dtypes import (
can_convert_to_column,
find_common_type,
is_decimal_dtype,
is_struct_dtype,
is_categorical_dtype,
is_decimal_dtype,
is_interval_dtype,
is_list_dtype,
is_list_like,
is_mixed_with_object_dtype,
is_scalar,
is_struct_dtype,
min_scalar_type,
)
from cudf.utils.utils import (
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.