79344218

Date: 2025-01-09 22:50:42
Score: 1
Natty:
Report link

You can select the numeric columns with .select_dtypes('number') [and .select_dtypes('object') for the categorical ones]:

numeric_cols = planets.select_dtypes('number').columns
P = planets.groupby(['type', 'magnetic_field'])[numeric_cols].agg(['mean', 'max'])
display(P)

df

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
Posted by: rehaqds