I want to know how to make a .csv list into a python list which I can do plotting and calculating:
I used:
fpath = r'C:112017\temp\tT.csv'
with open(fpath,'r') as csvfile:
reader = csv.reader(csvfile, delimiter=',')
for row in reader:
print(list(reader))
it gives me lists like this (which I dont' want):
[['2014-12-30', '18.34244791666665'], ['2014-12-31', '18.540224913494818'], ['2015-01-01', '18.15729166666666'],......
If I use
print(row)
it gives me lists like this (looks better but I still can not use it for calculating):
...
['2016-07-27', '20.434809022479584']
['2016-07-28', '21.395138886239796']
['2016-07-29', '20.81571181284057']
['2016-07-30', '20.565711801250778']
...
How can I use panda to make a list? Or is there any easier way to achieve this? Is that possible to use something like:
date = row[0]
temp = row[1]
lis = pd.DataFrame(date,temp)
I guess there are some basic mistakes, but I can't fix it by myself. Thank you for your time to help.