Closed
Description
import numpy as np
import pandas as pd
series = pd.Series([np.nan, np.nan, 1, 1, 2, 2, 3, 3, 4, 4])
bins = pd.cut(series.dropna(), 4)
# this works
series.dropna().groupby(bins).mean()
# but this results in:
# [1] 42448 segmentation fault python
series.groupby(bins).mean()
So, I can see why trying to group a series with bins based on a different (trimmed) series can't really work and don't consider that to be a bug, but it might be nice if pandas
threw a proper error message instead of segfaulting.