Search code examples
pythonpandasvalueerror

"Must explicitly set engine if not passing in buffer or path for io" in Panda


When running the following Python Panda code:

    xl          = pd.ExcelFile(dataFileUrl)
    sheets      = xl.sheet_names
    data        = xl.parse(sheets[0])
    colheaders  = list(data)

I receive the ValueError:

Must explicitly set engine if not passing in buffer or path for io

The file is for sure an excel file, no doubt about that.

What is happening?


Solution

  • I would try

    xl = pd.ExcelFile(dataFileUrl, engine='xlrd')