-
Notifications
You must be signed in to change notification settings - Fork 845
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
DataFrame.nlargest/nsmallest fail on sliced frame #50
Comments
Looks like this is related to what happens to the index when In [1]: import pandas as pd, pygdf as gd
In [2]: df = pd.DataFrame({'x': range(100), 'y': list(map(float, range(100)))})
In [3]: gdf = gd.DataFrame.from_pandas(df)
In [4]: p = gdf[10:20]
In [5]: p
Out[5]:
x y
10 10 10.0
11 11 11.0
12 12 12.0
13 13 13.0
14 14 14.0
15 15 15.0
16 16 16.0
17 17 17.0
18 18 18.0
19 19 19.0
In [6]: p.sort_values('x')
Out[6]:
x y
10 10 10.0
11 11 11.0
12 12 12.0
13 13 13.0
14 14 14.0
15 15 15.0
16 16 16.0
17 17 17.0
18 18 18.0
19 19 19.0
In [7]: x = p.x
In [8]: x.sort_values()
Out[8]:
0 10
1 11
2 12
3 13
4 14
5 15
6 16
7 17
8 18
9 19 |
sklam
added a commit
to sklam/pygdf
that referenced
this issue
Aug 23, 2017
sklam
added a commit
to sklam/pygdf
that referenced
this issue
Aug 23, 2017
raydouglass
pushed a commit
that referenced
this issue
Nov 7, 2023
Seeing how much this impacts the pandas test suite pass rate related to documenting how we test Authors: - Matthew Roeschke (https://github.com/mroeschke) - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: None URL: rapidsai/cudf-private#50
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works fine if the frame is sliced from the start, but fails if the slice is in the middle:
The text was updated successfully, but these errors were encountered: