groupby in #Python #Pandas is: df.groupby(CATEGORICAL)[NUMERIC].AGG_METHOD() CATEGORICAL means "not too many values." Pass a many-valued float, and Pandas won't refuse — here, 1,219 groups, most with one row. The mean of one number is... that number.
0 reposts1 like