-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG : DataFrameGroupBy.quantile segfault #28194
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
Comments
Hmm I can't reproduce on master. We fixed one of these in #27826 (this is a different example though). |
Great then ! I saw the fix but it didn't look related to this issue specifically. |
Can you try master to make sure? Seemed OK for me |
I just checked on master and it works. However, there is now a segfault on quantile for SeriesGroupBy. Here's the
|
Can you show a failing example? Did you make sure to recompile the C extensions before running that? |
I used the same code sample : import pandas as pd
import numpy as np
df = pd.DataFrame(data = {
"x": [1, 1, 1],
"y": [np.nan, np.nan, np.nan],
"z": [1, 2, 3]
})
# Segfault on SeriesGroupBy
df.groupby(["x", "y"])["z"].quantile(0.5)
# Now works on DataFrameGroupBy
df.groupby(["x", "y"])[["z"]].quantile(0.5) I followed the instructions given in the contribution guide and the Pandas documentation. I recompiled all the C extensions and I didn't get any error. I can try again to see if that changes something. |
This does not segfault for me on master. @benjaminriviere can you confirm this is still a problem? |
I ran into this issue today and can confirm the above code crashes on current master (0.26.0.dev0+583.g86e187f). I wrote a bit more about my findings in the other thread on this topic: |
I am getting an even odder result. I can run either of the commands fine, but running any two of them (one after the other) causes a crash: import pandas as pd
import numpy as np
df = pd.DataFrame(data = {
"x": [1, 1, 1],
"y": [np.nan, np.nan, np.nan],
"z": [1, 2, 3]
})
# If you uncomment any one of these, it runs.
# If you uncomment any two of these, it crashes the kernel.
#df.groupby(["x", "y"])["z"].quantile(0.5)
#df.groupby(["x", "y"])["z"].quantile(0.5)
#df.groupby(["x", "y"])[["z"]].quantile(0.5)
#df.groupby(["x", "y"])[["z"]].quantile(0.5) I naively pasted in the code above and got a crash. Not sure if this is unrelated, but I am also seeing groupby.quantile producing wrong results. (e.g. 0.5 quantile > than 0.75 quantile).
|
This is a duplicate of #28882 which was just fixed on master. Should have a 0.25.3 release out tomorrow for it |
Code Sample
Problem description
Hello all,
I just noticed that there is still an issue with the
quantile
function when used on aDataFrameGroupBy
object with Pandas 0.25.1. When the groupby operation is done with an empty column, a segfault occurs. Above is a code sample to reproduce the bug. This issue didn't occur with Pandas 0.24.2.Expected Output
Pandas 0.24.2 gives this output :
Output of
pd.show_versions()
My computer is running Ubuntu 18.04. Below are the installed packages (in a clean virtual env). The bug doesn't seem to be related to numpy as it also occured with version
1.16.4
.The text was updated successfully, but these errors were encountered: