I'm new to python, this is a fairly simple question. I have a .csv string and I want to remove the first line with the titles:
Date,Open,High,Low,Close,Volume,Adj Close
2016-01-08,1.658,1.70,1.625,1.639,15383400,1.639
2016-01-07,1.64,1.645,1.56,1.642,28015800,1.642
2016-01-06,1.68,1.734,1.672,1.71,15199200,1.71
What's the simplest way to do this? This is how I'm reading the data:
import requests
import csv
import json
theURL = 'http://ichart.yahoo.com/table.csv?s=REC.OL&a=0&b=1&c=2016&d=0&e=10&f=2016'
r = requests.get(theURL)
text = r.text
reader = csv.DictReader(text, fieldnames=("Date", "Open", "High", "Low", "Close", "Volume", "Adj Close"))
jsonText = json.dumps([row for row in reader])
Thanks in advance for your comments!