The question I'm trying to solve is to find the products with the slowest shipping speed.
the first step I did was to find the mean shipping speed for the products using the following code
westData.groupby('Product ID')['Shipping Speed'].agg(lambda x: x.mean())
and the result I have is in the following format
now I'm trying to filter the results to get only the results with the slowest shipping speed. in other words, return only the values that equal the maximum mean from the shipping speed column.
in my case the slowest shipping speed is
westData.groupby('Product ID')['Shipping Speed'].agg(lambda x: x.mean()).max()
Timedelta('7 days 00:00:00')
So I need to return only the products with the shipping speed of ('7 days 00:00:00')
which should be like the following