I know the argument usecols
in pandas.read_excel()
allows you to select specific columns.
Say I read an Excel file in with pandas.read_ex
As per the documentation for pandas.read_excel
, skiprows
must be list-like.
Try this instead to exclude rows 1 to 336 inclusive:
df = pd.read_excel("file.xlsx",
sheet_name = "Sheet1",
skiprows = range(1, 337),
usecols = "H:BD")
Note: range
constructor is considered list
-like for this purpose, so no explicit list conversion is necessary.