Halten Sie nur min -Einträge in DataFrame nach einer Spalte gruppiert

I feel like you're overthinking this. Just use groupby and idxmin
Real Raccoon