Pandas sort_values() is not working correctly in Datalore!

Hi Datalore Team,

Please have a look on

sorting_values()

in different Pandas environments:

Pandas docs:
s = pd.Series([np.nan, 1, 3, 10, 5])
s.sort_values(ascending=True)
1 1.0
2 3.0
4 5.0
3 10.0
0 NaN

Jupyter Lab:
s = pd.Series([np.nan, 1, 3, 10, 5])
s.sort_values(ascending=True)
1 1.0
2 3.0
4 5.0
3 10.0
0 NaN
dtype: float64

Ipython:
In [4]: s = pd.Series([np.nan, 1, 3, 10, 5])
In [5]: s.sort_values(ascending=True)
Out[5]:
1 1.0
2 3.0
4 5.0
3 10.0
0 NaN
dtype: float64

And finally Datalore:
s = pd.Series([np.nan, 1, 3, 10, 5])
s.sort_values(ascending=True)
1 nan

2 1.0

4 3.0

3 10.0

0 5.0

Thanks.

1 Like

Hello @Marceli, thank you for noticing it! It’s a bug in our pd.Series visualisation (print(s.sort_values(ascending=True)) will produce correct output), we’ll fix it asap. Sorry for the inconvenience

The fix is deployed, thank you again

2 Likes

Not a problem! Excellent! Thank you!