groupby.nth with dropna is buggy · Issue #11038 · pandas-dev/pandas (original) (raw)
df 1st 2nd 0 1 NaN 1 2 3 2 1 NaN 3 2 4 df.groupby('1st')['2nd'].nth(0, dropna=True) 1st 1 3 2 4 Name: 2nd, dtype: float64
df 1st 2nd 0 1 NaN 1 2 3 2 1 NaN 3 2 4 df.groupby('1st')['2nd'].nth(0, dropna=True) 1st 1 3 2 4 Name: 2nd, dtype: float64