Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Created September 2, 2023 22:47
Show Gist options
  • Save elijahbenizzy/bb37f5da7f28ea0c49ad32b138c530c7 to your computer and use it in GitHub Desktop.
Save elijahbenizzy/bb37f5da7f28ea0c49ad32b138c530c7 to your computer and use it in GitHub Desktop.
@config.when(mode="online")
@extract_columns(
"budget",
"age",
"gender",
)
def survey_results__online(client_id: int) -> pd.DataFrame:
"""Map operation to explode survey results to all fields
Data comes in JSON, we've grouped it into a series.
"""
return utils.query_survey_results(client_id=client_id)
@config.when(mode="online")
def last_logged_in__online(client_id: int) -> pd.Series:
return utils.query_login_data(client_id=client_id)["last_logged_in"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment