Skip to content
Snippets Groups Projects
Commit 63291722 authored by Lennard Geese's avatar Lennard Geese
Browse files

Implement isWet()

parent 7ea87beb
No related branches found
No related tags found
No related merge requests found
import re import re
import string
import pandas as pandas import pandas as pandas
from fastf1.core import Session, Lap, Laps, DataNotLoadedError from fastf1.core import Session, Lap, Laps, DataNotLoadedError
...@@ -119,6 +120,12 @@ class DataAnalyser(DataHandler): ...@@ -119,6 +120,12 @@ class DataAnalyser(DataHandler):
# ===== Weather ===== # ===== Weather =====
def isWet(self, weatherDescription: string):
keywords: list[string] = ["rain", "wet"]
for keyword in keywords:
if keyword in weatherDescription.lower(): return True
return False
def extractWeatherFromHtml(self, rawHtml): def extractWeatherFromHtml(self, rawHtml):
""" """
Extract an events weather conditions from its respective wikipedia page. Extract an events weather conditions from its respective wikipedia page.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment