pandas.read_excel

pandas.read_excel(io, sheetname, **kwds)

Read an Excel table into a pandas DataFrame

Parameters:

io : string, file-like object or xlrd workbook

If a string, expected to be a path to xls or xlsx file

sheetname : string

Name of Excel sheet

header : int, default 0

Row to use for the column labels of the parsed DataFrame

skiprows : list-like

Rows to skip at the beginning (0-indexed)

skip_footer : int, default 0

Rows at the end to skip (0-indexed)

index_col : int, default None

Column to use as the row labels of the DataFrame. Pass None if there is no such column

parse_cols : int or list, default None

  • If None then parse all columns,
  • If int then indicates last column to be parsed
  • If list of ints then indicates list of column numbers to be parsed
  • If string then indicates comma separated list of column names and column ranges (e.g. “A:E” or “A,C,E:F”)

na_values : list-like, default None

List of additional strings to recognize as NA/NaN

keep_default_na : bool, default True

If na_values are specified and keep_default_na is False the default NaN values are overridden, otherwise they’re appended to

verbose : boolean, default False

Indicate number of NA values placed in non-numeric columns

engine: string, default None :

If io is not a buffer or path, this must be set to identify io. Acceptable values are None or xlrd

Returns:

parsed : DataFrame

DataFrame from the passed in Excel file