Count values greater than row value in all previous rows in each group
I want to compare the numerical value of each row of groups with the previous rows of the same group and return the number of previous rows that have a value greater than the current row.
Pandas interpolation groupby with 3 columns
I have the following data
using groupby in conditional form in python
I have a df of people with their name and age and sex and other things.