I'm trying to do some basic analsys on ether historical prices for a school project. My problem is quite a simple one I think. I made a function that download the data from the URL, but the format is wrong. I got a dataframe thats size is (0,~14k). So I download the data, but I'm not sure how should I format it into a form that I can use.
I see 2 possibilities, I format the dataframe after download, which I will try to do. Or I download it in the correct format first, which would be the better and more elegant solution.
My problem that I don't know how to do the 2. and I may not succeed on the 1. thats why I make this post.
from pandas import DataFrame
from io import StringIO
url = 'https://poloniex.com/public?command=returnChartData¤cyPair=USDT_ETH&start=1435699200&end=9999999999&period=14400'
csv = requests.get(url)
return DataFrame.from_csv(StringIO(csv.text), sep=',')
import requests from pandas.io.json import json_normalize url = 'https://poloniex.com/public?command=returnChartData¤cyPair=USDT_ETH&start=1435699200&end=9999999999&period=14400' resp = requests.get(url) data_frame = json_normalize(resp.json())