You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uid int64
cid int64
role object
idx int64
dtype: object
Observed behaviour
f3.groupby('cid').first()
uid
role
idx
cid
1
95820843523155104
director
1
2
95820843523155104
director
4
3
95820843523155104
company director
6
The uid column contains values that are all the same and aren't in the original data. (This isn't always true in larger sets; sometimes there's an overlap.)
Expected behaviour
f3.groupby('cid').apply(lambdag: g[:1])
uid
role
idx
cid
1
0
95820843523155097
director
1
2
3
95820843523155100
director
4
3
5
95820843523155102
company director
6
This is what I expected to happen (i.e. the uid matches the rest of the row).
actually this is related to #9345 / #9311. these are getting casted to floats during the groupby. So that might fix it. But if you have very large numbers its actually better to make them object dtype which will preserve them entirely.
Not that familiar (at all :) with pandas internals, but I don't think this is expected behaviour.
Observed behaviour
The
uid
column contains values that are all the same and aren't in the original data. (This isn't always true in larger sets; sometimes there's an overlap.)Expected behaviour
This is what I expected to happen (i.e. the
uid
matches the rest of the row).The text was updated successfully, but these errors were encountered: