in python way to join rows with aggregate values so that there are a apecific number of rows in each group code example
Example: movie = data.groupby('_______')['_______'].agg(['_______','mean'])
planets.groupby('method')
planets.groupby('method')