Skip to content

Commit

Permalink
Fix the segment based time series analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
dyang415 committed Sep 2, 2023
1 parent af495d5 commit 67984de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ def get_time_series():
filtering_clause = filtering_clause & (polars.col(sub_key['dimension']).cast(str).eq(polars.lit(sub_key['value'])))

df = polars.read_csv(f'/tmp/dsensei/{fileId}') \
.with_columns(polars.col(date_column).str.slice(0, 10).str.to_date().alias("date"))
.with_columns(polars.col(date_column).str.slice(0, 10).str.to_date().alias("date")) \
.filter(filtering_clause)

return orjson.dumps(
get_segment_insight(
Expand Down

0 comments on commit 67984de

Please sign in to comment.