v-crn Code Log

主に備忘録

pandas.DataFrame.agg() における SpecificationError: nested renamer is not supported

f:id:v-crn:20191014115426p:plain

Code

df.agg({'feature': ['mean', 'count', 'std', 'median', 'skew']})

Error Message

SpecificationError: nested renamer is not supported

Solution

df.feature.agg(['mean', 'count', 'std', 'median', 'skew'])

Ref.

python - Solution for SpecificationError: nested renamer is not supported while agg() along with groupby() - Stack Overflow