import pandas as pd
df = pd.read_excel('test.xlsx', sheet_name='WBS')
dfItem = df['Item']
dfCommand = df['Command']
dfValue = df['Value']
dict = {'Item':dfItem, 'Command':dfCommand, 'Value':dfValue}
#对Dataframe格式数据进行数据清洗,删除值为空的行
data = pd.DataFrame(dict).dropna(axis=0,how='any')
pd.DataFrame(data).to_excel('new.xlsx')