We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When a lambda function only involves a single column - for example, fitness_test_date here:
fitness_test_date
https://github.com/matthewboehlke/intro-data-capstone-musclehub/blob/97693663a901bf0b6d665d73dd4665e82228931c/Intro_To_Data_Analysis_Matt_Boehlke/musclehub.py#L159
You could call .apply() on just that column:
.apply()
df['ab_test_group'] = df.fitness_test_date.apply(lambda x: 'A' if x is not None else 'B')
Here, the input x to the lambda function would simply be the value in the fitness_test_date column.
x
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When a lambda function only involves a single column - for example,
fitness_test_date
here:https://github.com/matthewboehlke/intro-data-capstone-musclehub/blob/97693663a901bf0b6d665d73dd4665e82228931c/Intro_To_Data_Analysis_Matt_Boehlke/musclehub.py#L159
You could call
.apply()
on just that column:Here, the input
x
to the lambda function would simply be the value in thefitness_test_date
column.The text was updated successfully, but these errors were encountered: