1

Tried all the possible options like

import pandas as pd

df = pd.read_csv('AD_Data')

data = pd.ExcelFile("AD_Data")
xl_file = pd.ExcelFile(AD_Data)

dfs = {sheet_name: xl_file.parse(AD_Data) for sheet_name in xl_file.AD_Data}
dfs = pd.read_excel(AD_Data, sheetname=None)

None of them are helping

The error I am getting that FileNotFoundError: File b'adData' does not exist

notebook and Data is in the same Folder. I tried keeping different folder too, did not help.

I can use / import any other file like text and convert to DataFrame and work on it in same note book and from same data folder.

TYZ
  • 8,466
  • 5
  • 29
  • 60
Masum Billah
  • 133
  • 1
  • 4
  • 13

1 Answers1

1

pd.read_excel (Python 3.6.4) works fine with xlsx on Windows.

Add the fileending .xlsx or make sure the file is in the same folder as the script.

dfs = pd.read_excel(r'C:\users\ilja\Desktop\Mappe1.xlsx', sheet_name=None)
print(dfs)
# OrderedDict([('Tabelle1',    1  5
# 0  2  6
# 1  3  7)])
ilja
  • 2,592
  • 2
  • 16
  • 23