I'm trying to make a DataFrame out of this xls file, but keep getting errors:
import pandas as pd
from pandas import *
xls = pd.ExcelFile('/home/nick/LA_County15K-50K.xls')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/pandas/io/excel.py", line 136, in __init__
self.book = xlrd.open_workbook(io)
File "/usr/lib/python2.7/dist-packages/xlrd/__init__.py", line 435, in open_workbook
ragged_rows=ragged_rows,
File "/usr/lib/python2.7/dist-packages/xlrd/book.py", line 91, in open_workbook_xls
biff_version = bk.getbof(XL_WORKBOOK_GLOBALS)
File "/usr/lib/python2.7/dist-packages/xlrd/book.py", line 1258, in getbof
bof_error('Expected BOF record; found %r' % self.mem[savpos:savpos+8])
File "/usr/lib/python2.7/dist-packages/xlrd/book.py", line 1252, in bof_error
raise XLRDError('Unsupported format, or corrupt file: ' + msg)
xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF record; found '\r\n '
I am using Linux Mint. Why am I getting this error and what can I do to fix it so I can make a DataFrame, thanks?