Last active
March 17, 2021 18:56
-
-
Save kvnkho/2965be63dcf3859d1674982e575ab348 to your computer and use it in GitHub Desktop.
Simple median
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#schema: user_id:int, measurement:int | |
def get_median(df:pd.DataFrame) -> pd.DataFrame: | |
return pd.DataFrame({'user_id': [df.iloc[0]['user_id']], | |
'median' : [df[['measurement']].median()]}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment