Column Statistics
df has a numeric column x. Return a dictionary with the keys "min", "max" and "mean" holding the smallest value, the largest value and the average of x.
Example 1
df {"x":[2,4,9]}
returns {"min":2,"max":9,"mean":5.0}
min 2, max 9, mean 5.
Constraints
- At least one row
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More pandas problems
- Column TotalBeginner
- Correlation of ColumnsBeginner
- Count Missing ValuesBeginner
- Count Repeated RowsBeginner
- Count Unique CitiesBeginner
- Count in RangeBeginner
- Drop Duplicate PairsBeginner
- Drop a ColumnBeginner