JanhaviZarapkar commited on
Commit
ee5e9c0
·
verified ·
1 Parent(s): 071cf42

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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: