Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ def load_data(file):
|
|
10 |
file.seek(0) # Move to the start of the file
|
11 |
df = pd.read_csv(file)
|
12 |
df['Date of Birth'] = pd.to_datetime(df['Date of Birth'], format='%Y-%m-%d', errors='coerce')
|
13 |
-
df['Visit Date'] = pd.to_datetime(df['Visit Date'],
|
14 |
df['Age'] = df['Date of Birth'].apply(lambda dob: (dt.datetime.now() - dob).days // 365)
|
15 |
return df
|
16 |
|
|
|
10 |
file.seek(0) # Move to the start of the file
|
11 |
df = pd.read_csv(file)
|
12 |
df['Date of Birth'] = pd.to_datetime(df['Date of Birth'], format='%Y-%m-%d', errors='coerce')
|
13 |
+
df['Visit Date'] = pd.to_datetime(df['Visit Date'], errors='coerce')
|
14 |
df['Age'] = df['Date of Birth'].apply(lambda dob: (dt.datetime.now() - dob).days // 365)
|
15 |
return df
|
16 |
|