Skip to content

Instantly share code, notes, and snippets.

@mohataher
Created January 24, 2018 16:50
Show Gist options
  • Save mohataher/cd112621646c03f742e8ecec96653477 to your computer and use it in GitHub Desktop.
Save mohataher/cd112621646c03f742e8ecec96653477 to your computer and use it in GitHub Desktop.
load-polar-hr-data-to-python-pandas-dataframe
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 26 columns, instead of 12 in line 2.
Name,Sport,Date,Start time,Duration,Total distance (km),Average heart rate (bpm),Average speed (km/h),Max speed (km/h),Average pace (min/km),Max pace (min/km),Calories,Fat percentage of calories(%),Average cadence (rpm),Average stride length (cm),Running index,Training load,Ascent (m),Descent (m),Notes,Height (cm),Weight (kg),HR max,HR sit,VO2max,
MTA,OTHER_INDOOR,23-06-2017,13:43:56,00:08:40,0.00,77,,,,,17,71,,,,,,,,170.0,64.0,,,,
Sample rate,Time,HR (bpm),Speed (km/h),Pace (min/km),Cadence,Altitude (m),Stride length (m),Distances (m),Temperatures (C),Power (W),
1,00:00:00,75,,,,,,,,,
,00:00:01,75,,,,,,,,,
,00:00:02,75,,,,,,,,,
,00:00:03,76,,,,,,,,,
,00:00:04,77,,,,,,,,,
,00:00:05,78,,,,,,,,,
,00:00:06,86,,,,,,,,,
,00:00:07,91,,,,,,,,,
,00:00:08,94,,,,,,,,,
,00:00:09,94,,,,,,,,,
,00:00:10,94,,,,,,,,,
,00:00:11,94,,,,,,,,,
,00:00:12,93,,,,,,,,,
,00:00:13,92,,,,,,,,,
,00:00:14,91,,,,,,,,,
,00:00:15,91,,,,,,,,,
,00:00:16,91,,,,,,,,,
,00:00:17,91,,,,,,,,,
,00:00:18,91,,,,,,,,,
,00:00:19,90,,,,,,,,,
,00:00:20,88,,,,,,,,,
,00:00:21,88,,,,,,,,,
,00:00:22,87,,,,,,,,,
,00:00:23,87,,,,,,,,,
,00:00:24,86,,,,,,,,,
,00:00:25,86,,,,,,,,,
,00:00:26,86,,,,,,,,,
,00:00:27,86,,,,,,,,,
,00:00:28,86,,,,,,,,,
,00:00:29,86,,,,,,,,,
,00:00:30,85,,,,,,,,,
,00:00:31,83,,,,,,,,,
,00:00:32,82,,,,,,,,,
,00:00:33,80,,,,,,,,,
,00:00:34,79,,,,,,,,,
,00:00:35,79,,,,,,,,,
,00:00:36,78,,,,,,,,,
,00:00:37,78,,,,,,,,,
,00:00:38,80,,,,,,,,,
,00:00:39,82,,,,,,,,,
,00:00:40,83,,,,,,,,,
,00:00:41,84,,,,,,,,,
,00:00:42,85,,,,,,,,,
,00:00:43,85,,,,,,,,,
,00:00:44,86,,,,,,,,,
,00:00:45,87,,,,,,,,,
,00:00:46,88,,,,,,,,,
,00:00:47,90,,,,,,,,,
,00:00:48,90,,,,,,,,,
,00:00:49,90,,,,,,,,,
,00:00:50,90,,,,,,,,,
,00:00:51,90,,,,,,,,,
,00:00:52,90,,,,,,,,,
,00:00:53,90,,,,,,,,,
,00:00:54,90,,,,,,,,,
,00:00:55,90,,,,,,,,,
,00:00:56,91,,,,,,,,,
,00:00:57,89,,,,,,,,,
,00:00:58,89,,,,,,,,,
,00:00:59,90,,,,,,,,,
,00:01:00,91,,,,,,,,,
,00:01:01,93,,,,,,,,,
,00:01:02,95,,,,,,,,,
,00:01:03,96,,,,,,,,,
,00:01:04,98,,,,,,,,,
,00:01:05,99,,,,,,,,,
,00:01:06,99,,,,,,,,,
,00:01:07,98,,,,,,,,,
,00:01:08,96,,,,,,,,,
,00:01:09,95,,,,,,,,,
,00:01:10,93,,,,,,,,,
,00:01:11,92,,,,,,,,,
,00:01:12,91,,,,,,,,,
,00:01:13,91,,,,,,,,,
,00:01:14,91,,,,,,,,,
,00:01:15,91,,,,,,,,,
,00:01:16,91,,,,,,,,,
,00:01:17,91,,,,,,,,,
,00:01:18,90,,,,,,,,,
,00:01:19,90,,,,,,,,,
,00:01:20,90,,,,,,,,,
,00:01:21,89,,,,,,,,,
,00:01:22,89,,,,,,,,,
,00:01:23,90,,,,,,,,,
,00:01:24,91,,,,,,,,,
,00:01:25,92,,,,,,,,,
,00:01:26,92,,,,,,,,,
,00:01:27,90,,,,,,,,,
,00:01:28,89,,,,,,,,,
,00:01:29,88,,,,,,,,,
,00:01:30,89,,,,,,,,,
,00:01:31,89,,,,,,,,,
,00:01:32,88,,,,,,,,,
,00:01:33,88,,,,,,,,,
,00:01:34,88,,,,,,,,,
,00:01:35,86,,,,,,,,,
,00:01:36,86,,,,,,,,,
,00:01:37,85,,,,,,,,,
,00:01:38,85,,,,,,,,,
,00:01:39,86,,,,,,,,,
,00:01:40,86,,,,,,,,,
,00:01:41,87,,,,,,,,,
,00:01:42,88,,,,,,,,,
,00:01:43,89,,,,,,,,,
,00:01:44,88,,,,,,,,,
,00:01:45,88,,,,,,,,,
,00:01:46,86,,,,,,,,,
,00:01:47,84,,,,,,,,,
,00:01:48,83,,,,,,,,,
,00:01:49,83,,,,,,,,,
,00:01:50,83,,,,,,,,,
,00:01:51,83,,,,,,,,,
,00:01:52,83,,,,,,,,,
,00:01:53,83,,,,,,,,,
,00:01:54,84,,,,,,,,,
,00:01:55,84,,,,,,,,,
,00:01:56,85,,,,,,,,,
,00:01:57,85,,,,,,,,,
,00:01:58,85,,,,,,,,,
,00:01:59,84,,,,,,,,,
,00:02:00,83,,,,,,,,,
,00:02:01,83,,,,,,,,,
,00:02:02,81,,,,,,,,,
,00:02:03,80,,,,,,,,,
,00:02:04,80,,,,,,,,,
,00:02:05,81,,,,,,,,,
,00:02:06,80,,,,,,,,,
,00:02:07,80,,,,,,,,,
,00:02:08,80,,,,,,,,,
,00:02:09,79,,,,,,,,,
,00:02:10,79,,,,,,,,,
,00:02:11,79,,,,,,,,,
,00:02:12,79,,,,,,,,,
,00:02:13,79,,,,,,,,,
,00:02:14,78,,,,,,,,,
,00:02:15,78,,,,,,,,,
,00:02:16,77,,,,,,,,,
,00:02:17,77,,,,,,,,,
,00:02:18,77,,,,,,,,,
,00:02:19,77,,,,,,,,,
,00:02:20,78,,,,,,,,,
,00:02:21,78,,,,,,,,,
,00:02:22,79,,,,,,,,,
,00:02:23,79,,,,,,,,,
,00:02:24,79,,,,,,,,,
,00:02:25,79,,,,,,,,,
,00:02:26,79,,,,,,,,,
,00:02:27,79,,,,,,,,,
,00:02:28,80,,,,,,,,,
,00:02:29,81,,,,,,,,,
,00:02:30,82,,,,,,,,,
,00:02:31,81,,,,,,,,,
,00:02:32,82,,,,,,,,,
,00:02:33,82,,,,,,,,,
,00:02:34,82,,,,,,,,,
,00:02:35,83,,,,,,,,,
,00:02:36,84,,,,,,,,,
,00:02:37,84,,,,,,,,,
,00:02:38,85,,,,,,,,,
,00:02:39,84,,,,,,,,,
,00:02:40,84,,,,,,,,,
,00:02:41,83,,,,,,,,,
,00:02:42,83,,,,,,,,,
,00:02:43,83,,,,,,,,,
,00:02:44,83,,,,,,,,,
,00:02:45,85,,,,,,,,,
,00:02:46,85,,,,,,,,,
,00:02:47,85,,,,,,,,,
,00:02:48,85,,,,,,,,,
,00:02:49,84,,,,,,,,,
,00:02:50,84,,,,,,,,,
,00:02:51,82,,,,,,,,,
,00:02:52,82,,,,,,,,,
,00:02:53,82,,,,,,,,,
,00:02:54,82,,,,,,,,,
,00:02:55,83,,,,,,,,,
,00:02:56,83,,,,,,,,,
,00:02:57,82,,,,,,,,,
,00:02:58,82,,,,,,,,,
,00:02:59,81,,,,,,,,,
,00:03:00,82,,,,,,,,,
,00:03:01,82,,,,,,,,,
,00:03:02,84,,,,,,,,,
,00:03:03,85,,,,,,,,,
,00:03:04,86,,,,,,,,,
,00:03:05,86,,,,,,,,,
,00:03:06,85,,,,,,,,,
,00:03:07,85,,,,,,,,,
,00:03:08,86,,,,,,,,,
,00:03:09,86,,,,,,,,,
,00:03:10,86,,,,,,,,,
,00:03:11,83,,,,,,,,,
,00:03:12,83,,,,,,,,,
,00:03:13,83,,,,,,,,,
,00:03:14,81,,,,,,,,,
,00:03:15,81,,,,,,,,,
,00:03:16,81,,,,,,,,,
,00:03:17,80,,,,,,,,,
,00:03:18,79,,,,,,,,,
,00:03:19,78,,,,,,,,,
,00:03:20,77,,,,,,,,,
,00:03:21,77,,,,,,,,,
,00:03:22,76,,,,,,,,,
,00:03:23,76,,,,,,,,,
,00:03:24,75,,,,,,,,,
,00:03:25,74,,,,,,,,,
,00:03:26,73,,,,,,,,,
,00:03:27,73,,,,,,,,,
,00:03:28,72,,,,,,,,,
,00:03:29,72,,,,,,,,,
,00:03:30,72,,,,,,,,,
,00:03:31,71,,,,,,,,,
,00:03:32,71,,,,,,,,,
,00:03:33,71,,,,,,,,,
,00:03:34,71,,,,,,,,,
,00:03:35,71,,,,,,,,,
,00:03:36,72,,,,,,,,,
,00:03:37,72,,,,,,,,,
,00:03:38,71,,,,,,,,,
,00:03:39,73,,,,,,,,,
,00:03:40,75,,,,,,,,,
,00:03:41,76,,,,,,,,,
,00:03:42,74,,,,,,,,,
,00:03:43,73,,,,,,,,,
,00:03:44,72,,,,,,,,,
,00:03:45,71,,,,,,,,,
,00:03:46,70,,,,,,,,,
,00:03:47,70,,,,,,,,,
,00:03:48,69,,,,,,,,,
,00:03:49,69,,,,,,,,,
,00:03:50,69,,,,,,,,,
,00:03:51,70,,,,,,,,,
,00:03:52,70,,,,,,,,,
,00:03:53,71,,,,,,,,,
,00:03:54,72,,,,,,,,,
,00:03:55,72,,,,,,,,,
,00:03:56,72,,,,,,,,,
,00:03:57,73,,,,,,,,,
,00:03:58,73,,,,,,,,,
,00:03:59,73,,,,,,,,,
,00:04:00,74,,,,,,,,,
,00:04:01,73,,,,,,,,,
,00:04:02,73,,,,,,,,,
,00:04:03,72,,,,,,,,,
,00:04:04,72,,,,,,,,,
,00:04:05,71,,,,,,,,,
,00:04:06,71,,,,,,,,,
,00:04:07,71,,,,,,,,,
,00:04:08,71,,,,,,,,,
,00:04:09,71,,,,,,,,,
,00:04:10,72,,,,,,,,,
,00:04:11,72,,,,,,,,,
,00:04:12,72,,,,,,,,,
,00:04:13,72,,,,,,,,,
,00:04:14,72,,,,,,,,,
,00:04:15,73,,,,,,,,,
,00:04:16,73,,,,,,,,,
,00:04:17,73,,,,,,,,,
,00:04:18,72,,,,,,,,,
,00:04:19,72,,,,,,,,,
,00:04:20,72,,,,,,,,,
,00:04:21,72,,,,,,,,,
,00:04:22,72,,,,,,,,,
,00:04:23,72,,,,,,,,,
,00:04:24,72,,,,,,,,,
,00:04:25,72,,,,,,,,,
,00:04:26,72,,,,,,,,,
,00:04:27,72,,,,,,,,,
,00:04:28,72,,,,,,,,,
,00:04:29,72,,,,,,,,,
,00:04:30,72,,,,,,,,,
,00:04:31,73,,,,,,,,,
,00:04:32,73,,,,,,,,,
,00:04:33,73,,,,,,,,,
,00:04:34,73,,,,,,,,,
,00:04:35,73,,,,,,,,,
,00:04:36,73,,,,,,,,,
,00:04:37,72,,,,,,,,,
,00:04:38,72,,,,,,,,,
,00:04:39,72,,,,,,,,,
,00:04:40,73,,,,,,,,,
,00:04:41,73,,,,,,,,,
,00:04:42,73,,,,,,,,,
,00:04:43,74,,,,,,,,,
,00:04:44,74,,,,,,,,,
,00:04:45,74,,,,,,,,,
,00:04:46,74,,,,,,,,,
,00:04:47,75,,,,,,,,,
,00:04:48,75,,,,,,,,,
,00:04:49,76,,,,,,,,,
,00:04:50,77,,,,,,,,,
,00:04:51,76,,,,,,,,,
,00:04:52,75,,,,,,,,,
,00:04:53,75,,,,,,,,,
,00:04:54,74,,,,,,,,,
,00:04:55,73,,,,,,,,,
,00:04:56,73,,,,,,,,,
,00:04:57,73,,,,,,,,,
,00:04:58,72,,,,,,,,,
,00:04:59,72,,,,,,,,,
,00:05:00,72,,,,,,,,,
,00:05:01,72,,,,,,,,,
,00:05:02,72,,,,,,,,,
,00:05:03,73,,,,,,,,,
,00:05:04,73,,,,,,,,,
,00:05:05,74,,,,,,,,,
,00:05:06,75,,,,,,,,,
,00:05:07,74,,,,,,,,,
,00:05:08,74,,,,,,,,,
,00:05:09,73,,,,,,,,,
,00:05:10,72,,,,,,,,,
,00:05:11,72,,,,,,,,,
,00:05:12,73,,,,,,,,,
,00:05:13,75,,,,,,,,,
,00:05:14,76,,,,,,,,,
,00:05:15,77,,,,,,,,,
,00:05:16,77,,,,,,,,,
,00:05:17,76,,,,,,,,,
,00:05:18,75,,,,,,,,,
,00:05:19,74,,,,,,,,,
,00:05:20,73,,,,,,,,,
,00:05:21,72,,,,,,,,,
,00:05:22,71,,,,,,,,,
,00:05:23,71,,,,,,,,,
,00:05:24,70,,,,,,,,,
,00:05:25,70,,,,,,,,,
,00:05:26,70,,,,,,,,,
,00:05:27,70,,,,,,,,,
,00:05:28,71,,,,,,,,,
,00:05:29,71,,,,,,,,,
,00:05:30,72,,,,,,,,,
,00:05:31,71,,,,,,,,,
,00:05:32,71,,,,,,,,,
,00:05:33,69,,,,,,,,,
,00:05:34,68,,,,,,,,,
,00:05:35,68,,,,,,,,,
,00:05:36,67,,,,,,,,,
,00:05:37,66,,,,,,,,,
,00:05:38,66,,,,,,,,,
,00:05:39,66,,,,,,,,,
,00:05:40,66,,,,,,,,,
,00:05:41,67,,,,,,,,,
,00:05:42,68,,,,,,,,,
,00:05:43,69,,,,,,,,,
,00:05:44,69,,,,,,,,,
,00:05:45,69,,,,,,,,,
,00:05:46,69,,,,,,,,,
,00:05:47,69,,,,,,,,,
,00:05:48,69,,,,,,,,,
,00:05:49,69,,,,,,,,,
,00:05:50,69,,,,,,,,,
,00:05:51,69,,,,,,,,,
,00:05:52,70,,,,,,,,,
,00:05:53,70,,,,,,,,,
,00:05:54,71,,,,,,,,,
,00:05:55,70,,,,,,,,,
,00:05:56,70,,,,,,,,,
,00:05:57,70,,,,,,,,,
,00:05:58,70,,,,,,,,,
,00:05:59,71,,,,,,,,,
,00:06:00,71,,,,,,,,,
,00:06:01,72,,,,,,,,,
,00:06:02,71,,,,,,,,,
,00:06:03,71,,,,,,,,,
,00:06:04,71,,,,,,,,,
,00:06:05,71,,,,,,,,,
,00:06:06,71,,,,,,,,,
,00:06:07,71,,,,,,,,,
,00:06:08,72,,,,,,,,,
,00:06:09,72,,,,,,,,,
,00:06:10,72,,,,,,,,,
,00:06:11,72,,,,,,,,,
,00:06:12,72,,,,,,,,,
,00:06:13,72,,,,,,,,,
,00:06:14,72,,,,,,,,,
,00:06:15,72,,,,,,,,,
,00:06:16,72,,,,,,,,,
,00:06:17,72,,,,,,,,,
,00:06:18,73,,,,,,,,,
,00:06:19,73,,,,,,,,,
,00:06:20,74,,,,,,,,,
,00:06:21,73,,,,,,,,,
,00:06:22,73,,,,,,,,,
,00:06:23,73,,,,,,,,,
,00:06:24,73,,,,,,,,,
,00:06:25,73,,,,,,,,,
,00:06:26,74,,,,,,,,,
,00:06:27,75,,,,,,,,,
,00:06:28,75,,,,,,,,,
,00:06:29,75,,,,,,,,,
,00:06:30,75,,,,,,,,,
,00:06:31,75,,,,,,,,,
,00:06:32,75,,,,,,,,,
,00:06:33,75,,,,,,,,,
,00:06:34,75,,,,,,,,,
,00:06:35,75,,,,,,,,,
,00:06:36,75,,,,,,,,,
,00:06:37,75,,,,,,,,,
,00:06:38,75,,,,,,,,,
,00:06:39,76,,,,,,,,,
,00:06:40,76,,,,,,,,,
,00:06:41,76,,,,,,,,,
,00:06:42,77,,,,,,,,,
,00:06:43,77,,,,,,,,,
,00:06:44,77,,,,,,,,,
,00:06:45,77,,,,,,,,,
,00:06:46,77,,,,,,,,,
,00:06:47,77,,,,,,,,,
,00:06:48,77,,,,,,,,,
,00:06:49,77,,,,,,,,,
,00:06:50,77,,,,,,,,,
,00:06:51,77,,,,,,,,,
,00:06:52,77,,,,,,,,,
,00:06:53,78,,,,,,,,,
,00:06:54,79,,,,,,,,,
,00:06:55,79,,,,,,,,,
,00:06:56,78,,,,,,,,,
,00:06:57,77,,,,,,,,,
,00:06:58,76,,,,,,,,,
,00:06:59,74,,,,,,,,,
,00:07:00,73,,,,,,,,,
,00:07:01,73,,,,,,,,,
,00:07:02,72,,,,,,,,,
,00:07:03,71,,,,,,,,,
,00:07:04,71,,,,,,,,,
,00:07:05,71,,,,,,,,,
,00:07:06,71,,,,,,,,,
,00:07:07,71,,,,,,,,,
,00:07:08,71,,,,,,,,,
,00:07:09,71,,,,,,,,,
,00:07:10,71,,,,,,,,,
,00:07:11,71,,,,,,,,,
,00:07:12,72,,,,,,,,,
,00:07:13,72,,,,,,,,,
,00:07:14,74,,,,,,,,,
,00:07:15,77,,,,,,,,,
,00:07:16,77,,,,,,,,,
,00:07:17,76,,,,,,,,,
,00:07:18,76,,,,,,,,,
,00:07:19,75,,,,,,,,,
,00:07:20,74,,,,,,,,,
,00:07:21,74,,,,,,,,,
,00:07:22,74,,,,,,,,,
,00:07:23,74,,,,,,,,,
,00:07:24,74,,,,,,,,,
,00:07:25,74,,,,,,,,,
,00:07:26,75,,,,,,,,,
,00:07:27,76,,,,,,,,,
,00:07:28,77,,,,,,,,,
,00:07:29,77,,,,,,,,,
,00:07:30,78,,,,,,,,,
,00:07:31,78,,,,,,,,,
,00:07:32,78,,,,,,,,,
,00:07:33,77,,,,,,,,,
,00:07:34,76,,,,,,,,,
,00:07:35,76,,,,,,,,,
,00:07:36,75,,,,,,,,,
,00:07:37,75,,,,,,,,,
,00:07:38,75,,,,,,,,,
,00:07:39,76,,,,,,,,,
,00:07:40,77,,,,,,,,,
,00:07:41,77,,,,,,,,,
,00:07:42,76,,,,,,,,,
,00:07:43,76,,,,,,,,,
,00:07:44,76,,,,,,,,,
,00:07:45,74,,,,,,,,,
,00:07:46,74,,,,,,,,,
,00:07:47,70,,,,,,,,,
,00:07:48,69,,,,,,,,,
,00:07:49,68,,,,,,,,,
,00:07:50,67,,,,,,,,,
,00:07:51,67,,,,,,,,,
,00:07:52,67,,,,,,,,,
,00:07:53,67,,,,,,,,,
,00:07:54,68,,,,,,,,,
,00:07:55,69,,,,,,,,,
,00:07:56,69,,,,,,,,,
,00:07:57,69,,,,,,,,,
,00:07:58,69,,,,,,,,,
,00:07:59,69,,,,,,,,,
,00:08:00,70,,,,,,,,,
,00:08:01,70,,,,,,,,,
,00:08:02,71,,,,,,,,,
,00:08:03,71,,,,,,,,,
,00:08:04,72,,,,,,,,,
,00:08:05,71,,,,,,,,,
,00:08:06,72,,,,,,,,,
,00:08:07,72,,,,,,,,,
,00:08:08,71,,,,,,,,,
,00:08:09,72,,,,,,,,,
,00:08:10,72,,,,,,,,,
,00:08:11,72,,,,,,,,,
,00:08:12,72,,,,,,,,,
,00:08:13,73,,,,,,,,,
,00:08:14,72,,,,,,,,,
,00:08:15,73,,,,,,,,,
,00:08:16,73,,,,,,,,,
,00:08:17,73,,,,,,,,,
,00:08:18,73,,,,,,,,,
,00:08:19,74,,,,,,,,,
,00:08:20,74,,,,,,,,,
,00:08:21,75,,,,,,,,,
,00:08:22,76,,,,,,,,,
,00:08:23,76,,,,,,,,,
,00:08:24,78,,,,,,,,,
,00:08:25,78,,,,,,,,,
,00:08:26,77,,,,,,,,,
,00:08:27,77,,,,,,,,,
,00:08:28,77,,,,,,,,,
,00:08:29,77,,,,,,,,,
,00:08:30,76,,,,,,,,,
,00:08:31,76,,,,,,,,,
,00:08:32,76,,,,,,,,,
,00:08:33,75,,,,,,,,,
,00:08:34,75,,,,,,,,,
,00:08:35,74,,,,,,,,,
,00:08:36,74,,,,,,,,,
,00:08:37,73,,,,,,,,,
,00:08:38,73,,,,,,,,,
,00:08:39,72,,,,,,,,,
import pandas as pd
import datetime
import time
row=None
with open("hr.csv") as fp:
for i, line in enumerate(fp):
if i == 1:
print(line)
row=line
elif i > 1:
break
splits=row.split(',')
print(splits)
date=splits[2]
mtime=splits[3]
mdatetime = date+' '+mtime
starting_ts = pd.to_datetime(mdatetime)
dates=[]
hrs=[]
with open("data/hr.csv") as fp:
for i, line in enumerate(fp):
if i < 3:
continue #skip headers
else:
splits=line.split(',')
rate=splits[1]
hr=splits[2]
#print(hr)
x = time.strptime(rate.split(',')[0],'%H:%M:%S')
seconds = datetime.timedelta(hours=x.tm_hour,minutes=x.tm_min,seconds=x.tm_sec).total_seconds()
#print(seconds)
ndate= starting_ts + pd.to_timedelta(seconds, unit='s')
#print(ndate)
dates.append(ndate)
hrs.append(hr)
data={'date':dates, 'hr':hrs}
df = pd.DataFrame(data=data, index=dates)
df.head()
df.to_csv('hr_df.csv')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment