Last active
July 23, 2021 19:16
-
-
Save LosantGists/92ef517fe1877a907eb7924ba8757147 to your computer and use it in GitHub Desktop.
Automating Unit Tests (6) 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 build_battery_history(values, device_id="60df87b4be3fc900069dac1f", start_time=1600000000000): | |
| id_array = [device_id] * len(values) | |
| timestamp_array = map(lambda t: start_time + t * 10000, range(len(values))) | |
| return pd.DataFrame({ | |
| "ID": pd.Series(id_array), | |
| "battery": pd.Series(values, dtype="int64"), | |
| "Timestamp": pd.Series(timestamp_array, dtype="int64") | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment