Update fitbit_parse_sleep.py
parent
56645d66b1
commit
9c1f2f6bbe
|
@ -200,8 +200,9 @@ def parseOneRecordForV12(record, device_id, d_is_main_sleep, records_summary, re
|
||||||
|
|
||||||
|
|
||||||
def parseSleepData(sleep_data, HOUR2EPOCH):
|
def parseSleepData(sleep_data, HOUR2EPOCH):
|
||||||
|
SLEEP_SUMMARY_COLUMNS = SLEEP_SUMMARY_COLUMNS_V1_2
|
||||||
if sleep_data.empty:
|
if sleep_data.empty:
|
||||||
return pd.DataFrame(columns=SLEEP_SUMMARY_COLUMNS_V1), pd.DataFrame(columns=SLEEP_INTRADAY_COLUMNS)
|
return pd.DataFrame(columns=SLEEP_SUMMARY_COLUMNS), pd.DataFrame(columns=SLEEP_INTRADAY_COLUMNS)
|
||||||
device_id = sleep_data["device_id"].iloc[0]
|
device_id = sleep_data["device_id"].iloc[0]
|
||||||
records_summary, records_intraday = [], []
|
records_summary, records_intraday = [], []
|
||||||
# Parse JSON into individual records
|
# Parse JSON into individual records
|
||||||
|
|
Loading…
Reference in New Issue