ralate2 commited on
Commit
afab428
·
verified ·
1 Parent(s): 6835d5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -62,6 +62,10 @@ def load_and_clean_data():
62
  data['Longitude'] = data['Mapped Location'].str.extract(r', ([^,]+)\)')[0].astype(float)
63
  data['Year Reported'] = data['Year Reported'].astype(int)
64
  data['Month Reported'] = data['Date Reported'].dt.month
 
 
 
 
65
  return data
66
 
67
  # Loading the data
 
62
  data['Longitude'] = data['Mapped Location'].str.extract(r', ([^,]+)\)')[0].astype(float)
63
  data['Year Reported'] = data['Year Reported'].astype(int)
64
  data['Month Reported'] = data['Date Reported'].dt.month
65
+
66
+ # Preprocessing the 'housing Block' column
67
+ data['Housing Block'] = data['Housing Block'].str.strip().str.lower()
68
+
69
  return data
70
 
71
  # Loading the data