Skip to content
Snippets Groups Projects
Commit 6055f78a authored by Yuan Gao's avatar Yuan Gao
Browse files

deploy version

parent 64f3172e
No related branches found
No related tags found
No related merge requests found
......@@ -195,7 +195,8 @@ def data_endpoint():
# Convert timestamps to string for JSON serialization
if 'start_time' in df.columns:
logger.info("Converting timestamps...")
df['start_time'] = pd.to_datetime(df['start_time']).astype(str)
# Most flexible approach:
df['start_time'] = pd.to_datetime(df['start_time'], format='mixed', errors='coerce').astype(str)
# Convert to records and handle NaN values
logger.info("Converting to records...")
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment