Task 10
Detailed summary report
With all this data cleaning, analysis, and visualization, let's create detailed summary tables of my training.
To do this, we'll create two tables. The first table will be a summary of the distance (km) and climb (m) variables for each training activity. The second table will list the summary statistics for the average speed (km/hr), climb (m), and distance (km) variables for each training activity.
Create a summary report.
Concatenate the
df_run
DataFrame withdf_walk
anddf_cycle
usingappend()
, then sort based on the index in descending order. Assign the result todf_run_walk_cycle
.Group
df_run_walk_cycle
by activity type, then select the columns indist_climb_cols
. Sum the result usingsum()
. Assign the result todf_totals
.Use the
stack()
method ondf_summary
to show a compact reshaped form of the full summary report.
Helpful links:
describe()
function documentationstack()
method documentation
Last updated