Skip to content

Incompatible behavior with pandas for Series.div() when divide by zero. #1411

@itholic

Description

@itholic

The existing implementation of Series.div() doesn't same as pandas.

>>> pser
0    100.0
1      NaN
2   -300.0
3      NaN
4    500.0
5   -700.0
Name: Koalas, dtype: float64

>>> pser.div(0)
0    inf
1    NaN
2   -inf
3    NaN
4    inf
5   -inf
Name: Koalas, dtype: float64

>>> ks.from_pandas(pser).div(0)
0    None
1    None
2    None
3    None
4    None
5    None
Name: Koalas, dtype: object

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions