I have a large single column CSV file that I need to read each row and convert to a float and then find the min and max and mean average for each chunk of data. The data has 16 decimal precision.
I have tried processing with pandas as chunk, but am ne to pandas and don't seem to understand how each defined chunk (1000 rows by 1 column) is treated.
How can I convert each row in the chunk to a float [list] so that I can then find the min, max, and mean average?
chunk_size = 1000 ** 1
for chunk in pd.read_csv(filename, chunksize=chunk_size):
mpg = []
for row in chunk:
mpg = [float(row[0]) for row in chunk]
print mpg
tmpMax = max(mpg)
print tmpMax