I have a CSV which looks like this:
Date,Open,High,Low,Close,Adj Close,Volume 2007-07-25,4.929000,4.946000,4.896000,4.904000,4.904000,0 2007-07-26,4.863000,4
I think you need to_numeric with errors='coerce' because it seems there are some bad data:
errors='coerce'
data = pd.read_csv(file, index_col='Date', usecols=['High','Low']) data = data.apply(pd.to_numeric, errors='coerce')