Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix-569: set Laptime to NaT for drivers crashed in lap 1. Assign NaN position. #586

Closed
wants to merge 8 commits into from

Conversation

AND2797
Copy link

@AND2797 AND2797 commented May 13, 2024

There is a special case in _load_laps_data to create data for drivers crashed in lap1. In that, previously we were assigning data['Time'].min() this was the source of the bug.

I modified two things:
assign time as pd.NaT for crashed drivers.

And while generating the position of drivers for the lap, assign np.NaN to drivers who have NaT/NaN times.

@AND2797
Copy link
Author

AND2797 commented May 14, 2024

I'll take a look at the failing tests.

@theOehrly
Copy link
Owner

The chained [...][...] write access is probably responsible for the Pandas warning.

I'm also not sure if we can really set 'Time' to NaT. That might break getting telemetry data for the crash laps (and I'm not sure if there's a test for that). But we might need to leave the 'Time' as it is and only detect based on 'LapTime' being NaT and maybe this being the last lap of that driver.

@AND2797 AND2797 changed the title 569: set Laptime to NaT for drivers crashed in lap 1. Assign NaN position. Fix-569: set Laptime to NaT for drivers crashed in lap 1. Assign NaN position. May 26, 2024
@AND2797 AND2797 closed this May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants