F1-analysis / pages /Fastest_Lap.py
tracinginsights's picture
Create Fastest_Lap.py
e4be364
raw
history blame
467 Bytes
import streamlit as st
from repo_directory import Fastest_Lap
from repo_directory import button
df, f1session = Fastest_Lap.get_fastest_laps(YEAR_SELECTED,RACE_SELECTED, SESSION )
DRIVER = df.iloc[0, 0]
TIME = df.iloc[0, 1]
MINUTE = TIME.total_seconds() // 60
MINUTE = int(MINUTE)
SECONDS = TIME.total_seconds() % 60
SECONDS = int(SECONDS)
MICROSECONDS = TIME.microseconds // 1000
TOTAL_TIME = f"{MINUTE}:{SECONDS}.{MICROSECONDS}"
Fastest_Lap.plot(df, f1session)