davanstrien HF staff commited on
Commit
4072c1c
1 Parent(s): 9380316
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -143,11 +143,9 @@ def prep_dataframe(remove_orgs_and_users=remove_orgs, columns_to_drop=columns_to
143
  def filter_df_by_max_age(max_age_days=None):
144
  df = prep_dataframe()
145
  df = df.dropna(subset=["created"])
146
-
147
- now = datetime.datetime.now()
148
-
149
  if max_age_days is not None:
150
- max_date = now - datetime.timedelta(days=max_age_days)
151
  df = df[df["created"] >= max_date]
152
 
153
  return df
 
143
  def filter_df_by_max_age(max_age_days=None):
144
  df = prep_dataframe()
145
  df = df.dropna(subset=["created"])
146
+ now = datetime.now()
 
 
147
  if max_age_days is not None:
148
+ max_date = now - timedelta(days=max_age_days)
149
  df = df[df["created"] >= max_date]
150
 
151
  return df