Answers for "pandas define how you want to aggregate each column"

0

pandas define how you want to aggregate each column

#Aggregate columns based on a specific aggregation metric
#Here we find the mean of column 1 and the median of column 2
df.agg({'columnn_1':'mean', 'column_2': 'median'})
Posted by: Guest on September-27-2021

Python Answers by Framework

Browse Popular Code Answers by Language