When using groupby, change the type to distort the value. #2131
Unanswered
tommyhj217
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Hi, I can't reproduce your issue. Can you say anything more about the data, are you loading it from an hdf5 file, do you do any other operations before it etc.. This example works for me: import vaex
import numpy as np
x = np.arange(-218, 218, dtype=np.int64)
df = vaex.from_arrays(x=x)
df = df.export_hdf5('../tmp.hdf5')
df = vaex.open('../tmp.hdf5')
df.groupby(['x'], agg={'cnt': 'count'}) Can you provide a minimal example as above that showcases the issue? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
DataFrame delay_time has values from -276 to 111 and dtype=int64.
The number of values is 206.
df_delaytime_data = vdf_2.groupby(['delay_time'], agg={'cnt':'count'})
However, if you do groupby, the dtype of the column is changed to int8, and the value of -128 or higher is changed to positive.
Is this a problem with groupby?
How can we solve it?
Thanks
Hyunjun
Beta Was this translation helpful? Give feedback.
All reactions