Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,10 @@ def load_and_preprocess_data(file_path):
|
|
| 9 |
# Basic preprocessing
|
| 10 |
df = df.drop(['X', 'Y'], axis=1)
|
| 11 |
df.dropna(subset=['Incidentid', 'DateTime', 'Year', 'Latitude', 'Longitude'], inplace=True)
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
| 13 |
# Fill missing values
|
| 14 |
numeric = ['Age_Drv1', 'Age_Drv2']
|
| 15 |
for col in numeric:
|
|
|
|
| 9 |
# Basic preprocessing
|
| 10 |
df = df.drop(['X', 'Y'], axis=1)
|
| 11 |
df.dropna(subset=['Incidentid', 'DateTime', 'Year', 'Latitude', 'Longitude'], inplace=True)
|
| 12 |
+
|
| 13 |
+
# Convert Year to int
|
| 14 |
+
df['Year'] = df['Year'].astype(int)
|
| 15 |
+
|
| 16 |
# Fill missing values
|
| 17 |
numeric = ['Age_Drv1', 'Age_Drv2']
|
| 18 |
for col in numeric:
|