thak123 commited on
Commit
7ccc748
·
verified ·
1 Parent(s): 05a3992

Update index.py

Browse files
Files changed (1) hide show
  1. index.py +5 -5
index.py CHANGED
@@ -221,12 +221,12 @@ def update_output(selected_topic, selected_domain, start_date, end_date):
221
  print("topic:",selected_topic,"domain:",selected_domain,"start:", start_date,"end:", end_date,"\n\n")
222
 
223
  # This is a hack to filter dates to confine to respective topic boundaries
224
- min_topic_date = df[df["Topic"] == selected_topic]["date"].min()
225
- max_topic_date = df[df["Topic"] == selected_topic]["date"].max()
226
-
227
  #if start visualisation from where the topic starts
228
- start_date = min_topic_date.dt.date if (min_topic_date > convert_to_datetime(start_date)) else start_date
229
- end_date = max_topic_date.dt.date if (max_topic_date < convert_to_datetime(end_date)) else end_date
230
 
231
  print("After: Sd",start_date,"Ed",end_date)
232
 
 
221
  print("topic:",selected_topic,"domain:",selected_domain,"start:", start_date,"end:", end_date,"\n\n")
222
 
223
  # This is a hack to filter dates to confine to respective topic boundaries
224
+ min_topic_date = df[df["Topic"] == selected_topic]["date"].min().date()
225
+ max_topic_date = df[df["Topic"] == selected_topic]["date"].max().date()
226
+ print("min",min_topic_date,"max",max_topic_date)
227
  #if start visualisation from where the topic starts
228
+ start_date = min_topic_date if (min_topic_date > convert_to_datetime(start_date)) else start_date
229
+ end_date = max_topic_date if (max_topic_date < convert_to_datetime(end_date)) else end_date
230
 
231
  print("After: Sd",start_date,"Ed",end_date)
232