Skip to content

Commit

Permalink
feat(pandas): implement degrees
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and kszucs committed May 23, 2022
1 parent 6816b75 commit 25b4f69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 5 additions & 0 deletions ibis/backends/pandas/execution/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ def execute_series_radians(_, data, **kwargs):
return np.radians(data)


@execute_node.register(ops.Degrees, (pd.Series, *numeric_types))
def execute_series_degrees(_, data, **kwargs):
return np.degrees(data)


@execute_node.register((ops.Ceil, ops.Floor), pd.Series)
def execute_series_ceil(op, data, **kwargs):
return_type = np.object_ if data.dtype == np.object_ else np.int64
Expand Down
9 changes: 1 addition & 8 deletions ibis/backends/tests/test_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,7 @@ def test_isnan_isinf(
L(5.556).degrees(),
math.degrees(5.556),
id='degrees',
marks=pytest.mark.notimpl(
[
"dask",
"datafusion",
"impala",
"pandas",
]
),
marks=pytest.mark.notimpl(["dask", "datafusion", "impala"]),
),
param(L(11) % 3, 11 % 3, id='mod'),
],
Expand Down

0 comments on commit 25b4f69

Please sign in to comment.