Skip to content

Commit

Permalink
make excel index use unix ms and fix minor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MCLiii committed Apr 3, 2024
1 parent 309626f commit 0987845
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Backend/components/record_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
from fastapi import APIRouter, Response
import pandas as pd
import io

import config
router = APIRouter()

@router.get("/get-processed-data")
async def get_processed_data(start_time, end_time):
all_keys = list(comms.frontend_data.keys())
all_keys = list(config.FORMAT.keys())
all_keys.remove('tstamp_ms')
all_keys.remove('tstamp_sc')
all_keys.remove('tstamp_mn')
Expand All @@ -16,7 +16,6 @@ async def get_processed_data(start_time, end_time):

result = await db.query_without_aggregation(all_keys, start_time, end_time)

result.index = pd.to_datetime(result.index, unit='ms')

# see https://stackoverflow.com/a/63989481
output = io.BytesIO()
Expand Down

0 comments on commit 0987845

Please sign in to comment.