Function Method
Function (I)
Method |
Description |
.size() |
Calculate how many rows |
.mean() |
Calculate average value |
.mean() |
Calculate median value |
.max() |
Calculate maximum value |
.min() |
Calculate minimum value |
.std() |
Calculate standard deviation value |
.sum() |
Calculate total |
Function (II)
Method |
Description |
.first() |
Take first element from each of group. |
.las() |
Take first element from each of group. |
.rank() |
Take rank on data in the group. |
.head() |
Take n first data from each of group. |
.tail() |
Calculate n last data from each of group. |
.all() |
Returns logical function AND |
.any() |
Calculate amount |
.agg
by_area_tenant.agg({"Rent" : ["min", "max", "mean"],
"Size" : ["min", "max"]})
Use to combine multiple function at different columns. We can specify then name of columns as dictionary keys, and the function as dictionary values.