Koalas: Outputs vary for Koalas Series vs Pandas Series when we have np.nan

Created on 1 May 2019  Â·  5Comments  Â·  Source: databricks/koalas

The behavior of the Series functions changes when I introduced a np.nan in the series. But Pandas seem to handle this just fine. Some of the functions and their outputs.

def usingSeries():
    s = ks.Series([11, 3, 5, 6, 8,np.nan])
    print(s.max())
    print(s.min())
    print(s.kurtosis())
    print(s.std())
nan
3.0
nan
nan
def usingPdSeries():
    s = pd.Series([11, 3, 5, np.nan, 6, 8])
    print(s.max())
    print(s.min())
    print(s.kurtosis())
    print(s.std())
11.0
3.0
-0.0034686090877542597
3.049590136395381
bug

Most helpful comment

When running

s = ks.Series([11, 3, 5, 6, 8, np.nan])
print(s.max())
print(s.min())
print(s.kurtosis())
print(s.std())

with Koalas 0.2, I get the following output:

11.0
3.0
-1.0008671522719388
3.0495901363953815

Has this issue been fixed with the latest Koalas release or is something wrong with @akhilanandbv003's setup?

All 5 comments

Thanks for reporting!

When running

s = ks.Series([11, 3, 5, 6, 8, np.nan])
print(s.max())
print(s.min())
print(s.kurtosis())
print(s.std())

with Koalas 0.2, I get the following output:

11.0
3.0
-1.0008671522719388
3.0495901363953815

Has this issue been fixed with the latest Koalas release or is something wrong with @akhilanandbv003's setup?

It works fine for me.

>>> s = ks.Series([11, 3, 5, 6, 8, np.nan])
>>> print(s.max())
11.0
>>> print(s.min())
3.0
>>> print(s.kurtosis())
-1.0008671522719395
>>> print(s.std())
3.0495901363953815

I also confirmed that it works fine. Closing this. Thank you guys.

Thanks for the update. I was getting that behavior with 0.1. Didn’t get a
chance to try with 0.2 release though.

On Fri, May 3, 2019 at 3:41 AM Hyukjin Kwon notifications@github.com
wrote:

Closed #208 https://github.com/databricks/koalas/issues/208.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/databricks/koalas/issues/208#event-2316746731, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADKLDXSRL5XLXSB6CNABEVDPTP3DRANCNFSM4HJQ2OBA
.

>

Sent from my iphone

Was this page helpful?
0 / 5 - 0 ratings