Q:

Pandas Dataframe header do not match correct column

I print pandas dataframe with this code
df=pd.read_csv(pd.compat.StringIO(output),skiprows=[1,2,3,4,5,6,7,9])

new_header = df.iloc[0]
df = df[1:]
df.columns = new_header

print(df)

It show output like this. The dataframe header do not match correct column. ID header not on the column 2. 
0             ID    MAC            Name              Group   IP             Type            State  STA Uptime          ExtraInfo
1    0     10c0-ffff-0000 TEST-A1 @1ABCD -              AP12345        idle   0   -               -                 
2    1     10c0-ffff-000f TEST-A2 @2ABCD 10.20.0.1      AP12345        nor    1   12D:5H:10M:16S  - 

I use print(df.columns) it show output like this. It look like header not separate. 
Index(['ID    MAC            Name              Group   IP             Type            State  STA Uptime          ExtraInfo'], dtype='object', name=0)

I export to csv it show data in same line like this picture.

So I edit code by using delim_whitespace like this.
df=pd.read_csv(pd.compat.StringIO(output),skiprows=[1,2,3,4,5,6,7,9],delim_whitespace=True)

The output of print(df.columns) show header like this.
Index(['STA', 'Uptime', 'ExtraInfo'], dtype='object', name=('ID', 'MAC', 'Name', 'Group', 'IP', 'Type', 'State'))

I export data to csv but it show header 3 column only like this picture.

I print(df) it show output like this.
('ID', 'MAC', 'Name', 'Group', 'IP', 'Type', 'State')
STA  ... ExtraInfo
0
10c0-ffff-0000 TEST-A1        @1ABCD -              AP12345 idle  0    ...  -       
1
10c0-ffff-000f TEST-A2        @1ABCD 10.20.0.1      AP12345 nor   0    ...  -   

Why dataframe header do not match correct column? How to fix it?

A:

This could be done with 1 line unless I'm understanding incorrectly: 
df=pd.read_csv(pd.compat.StringIO(output),skiprows=[1,2,3,4,5,6,7,9], header=None,names=['ID', 'MAC', 'Name', 'Group', 'IP', 'Type', 'State'])

