Python reads CSV on OS X differently then Windows?
It turns out there was just a problem in the csv file. What happened was that I was running the same file, which caused another header row to be entered. When there is more then one header row, the script tries to convert something like "ind_sharpe" into a float which obviously will not work, and breaks the program.
The solution, overwrite header rows, don't stack them.
I have a Python script that writes and reads multiple CSV files. On OS X, in order to perform any calculations on any values in the CSV file, I have to float the value float(d['var_returns']). This works perfectly fine on OS X and the entire script works as performed.
However, using the exact same code on Windows, I get:
ValueError: could not convert string to float: var_returns
I was wondering why this is happening, and how I can fix it? The typical value in var_returns would be 0.050244079