Skip to content

Table of Vettel Laptimes #110

Answered by markste-in
Majd-ui asked this question in Q&A
Discussion options

You must be logged in to vote

maybe try something like this

def format(time_value):
    s = pd.Timedelta.total_seconds(time_value)
    return f"{int(s//60)}:{np.round(s%60,3)}"

df["LapTime_formatted"] = df["LapTime"].apply(format)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Majd-ui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants