I tried to open a big .csv file in python to seperate each row and append the last x lines in a new list.
btcDatear = 
btcPricear = 
btcVolumear = 
howfarback = 20000
sourceCode = open('.btceUSD.csv', 'r')
splitSource = sourceCode.split('\n')
for eachline in splitSource[-howfarback:]:
splitLine = eachline.split(',')
btcDate = splitLine
btcPrice = splitLine
btcVolume = splitLine
except Exception, e:
print "failed raw data", str(e)
It works with file as small as 20MB but when i try it with a file around 500MB, it does not work.