How to penalize for empty fields in DataFrame?

by jatrp5   Last Updated April 15, 2019 11:19 AM

I have to calculate the consistency of racing car drivers during the whole season. My DataFrame consists of 10 columns (10 circuit names) and for each of those columns I have the standard deviation in lap time the driver posted in that circuit. In other words, how consistent the driver is from lap to lap. In races the driver did not finish the field is blank.

So far I have calculated their average season consistency by averaging all 10 columns. However, not finishing a race should affect a driver's consistency negatively and I do not know how to implement that. If I fill it with the average value of the finished races I am not really penalizing him for crashing.

Related Questions

Imputation of missing values - longitudinal data

Updated June 14, 2017 12:19 PM

How to handle missing data in my dataset?

Updated April 04, 2018 09:19 AM