Created
July 23, 2021 19:25
-
-
Save LosantGists/7ebcf864ec3590246d08828e4859f60a to your computer and use it in GitHub Desktop.
Automating Unit Tests Blog (8) 7.23.21
This file contains hidden or 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
| def get_rows_before_charging(df): | |
| df['battery_loss_next_row'] = df['battery'] - df['battery'].shift(-1) | |
| df['is_low_before_charge'] = df['battery_loss_next_row'] < 0 | |
| return df[df['is_low_before_charge']] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment