Skip to main content

min()

df.groupby(column_name).min()

Returns a DataFrame, with rows as groups, and each column as the min of the column values within each group.

Note:
Columns with String values display the minimum alphabetical starting character (ex. "black" is alphabetically before "golden" and "white").

pets
IndexSpeciesColorWeightAge
0dogblack405
1catgolden158
2catblack209
3dogwhite802
4dogblack250.5
5hamsterblack13
6hamstergolden0.250.2
pets.groupby('Species').min()
IndexIDColorWeightAgeIs_CatOwner_Comment
catcat_001black1.50True****All you need is love and a cat.****
dogdog_001black250.5False There are no bad dogs, only bad owners.
hamsterham_001black0.250.2FalseNo, thank you!