Spaces:
Sleeping
Sleeping
Update index.py
Browse files
index.py
CHANGED
@@ -234,7 +234,7 @@ def update_output(selected_topic, selected_domain, start_date, end_date):
|
|
234 |
|
235 |
# Bar Graph start
|
236 |
# Convert 'period' column to datetime
|
237 |
-
|
238 |
|
239 |
grouped_df = df_filtered.groupby(['period', 'Veículos de notícias']).size().reset_index(name='occurrences')
|
240 |
|
|
|
234 |
|
235 |
# Bar Graph start
|
236 |
# Convert 'period' column to datetime
|
237 |
+
df_filtered['period'] = pd.to_datetime(df_filtered['date'], format='%m/%Y')
|
238 |
|
239 |
grouped_df = df_filtered.groupby(['period', 'Veículos de notícias']).size().reset_index(name='occurrences')
|
240 |
|