Skip to content

Commit 787e8d3

Browse files
Update src/api/common/database/sqldb_service.py
Co-authored-by: Copilot <[email protected]>
1 parent 387931b commit 787e8d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/api/common/database/sqldb_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,9 @@ async def fetch_chart_data(chart_filters: ChartFilters = ''):
300300
if not df.empty:
301301
nested_json3 = (
302302
df.groupby(['id', 'chart_name', 'chart_type']).apply(
303-
lambda x: x[['text', 'size', 'average_sentiment']].to_dict(orient='records'), include_groups=False).reset_index()
303+
lambda x: x[['text', 'size', 'average_sentiment']].to_dict(orient='records'),
304+
include_groups=False
305+
).reset_index()
304306
)
305307
nested_json3.columns = ['id', 'chart_name', 'chart_type', 'chart_value']
306308
result3 = nested_json3.to_dict(orient='records')

0 commit comments

Comments
 (0)