I'm diving into pandas and experimenting around. As for reading data from an Excel file. I wonder what's the difference between using ExcelFile to read_excel. Both seem to work (albeit slightly different syntax, as could be expected), and the documentation supports both. In both cases, the documentation describes the method the same: "Read an Excel table into DataFrame" and "Read an Excel table into a pandas DataFrame". (documentation for read_excel, and for excel_file)
I'm seeing answers here on SO that uses either, w/o addressing the difference. Also, a Google search didn't produce a result that discusses this issue.
WRT my testing, these seem equivalent:
path = "test/dummydata.xlsx"
xl = pd.ExcelFile(path)
df = xl.parse("dummydata") # sheet name
and
path = "test/dummydata.xlsx"
df = pd.io.excel.read_excel(path, sheetname=0)
other than the fact that the latter saves me a line, is there a difference between the two, and is there a reason to use either one?
Thanks!