Aug-26-2023, 01:16 AM
OP says the number of blank rows is not always the same. I think a two step approach is headed. First read in the excel file. Count the number of leading blanks, then read in the file again. Something like this:
import pandas as pd df = pd.read_excel("To_f.xlsx") for i, value in enumerate(df.iloc[:, 0]): if type(value) is int: if i > 0: df = pd.read_excel("To_f.xlsx", skiprows=i) break print(df)