Created
March 2, 2023 10:00
-
-
Save tomas-quix/8f4b3aee00c0a425eaac2bd9a83ec26d to your computer and use it in GitHub Desktop.
OSS Announcement
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
# Callback triggered for each new data frame | |
def on_parameter_data_handler(df: pd.DataFrame): | |
# If the braking force applied is more than 50%, we mark HardBraking with True | |
df["HardBraking"] = df.apply(lambda row: "True" if row.Brake > 0.5 else "False", axis=1) | |
stream_producer.timeseries.publish(df) # Send data back to the stream |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment