Skip to content

Commit

Permalink
pandas demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-Armstrong committed Nov 5, 2023
1 parent 73a00ef commit e924864
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test_scripts/pandas_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import pandas as pd


def calculate_summary_statistics(dataframe):
if 'age' in dataframe.columns and 'height' in dataframe.columns and 'weight' in dataframe.columns:
age_sum = dataframe['age'].sum()

height_min = dataframe['height'].min()

weight_mean = dataframe['weight'].mean()

return age_sum, height_min, weight_mean
else:
return None

0 comments on commit e924864

Please sign in to comment.