how to remove header from nested dataframe after reading excel python code example
Example 1: python pd.DataFrame.from_records remove header
df.rename(columns=df.iloc[0]).drop(df.index[0])
Example 2: pandas remove multi header from dataframe
df = pd.read_table('yourfile.csv', header=None, delim_whitespace=True, skiprows=1)
df.columns = ['0','POSITION_T','PROB','ID']
del df['0']
# filtering out the rows with `POSITION_T` value in corresponding column
df = df[df.POSITION_T.str.contains('POSITION_T') == False]
print(df)