P.S- there's a one row footer in the end as well
https:
你可以尝试这样的东西
import pandas as pd
import xlrd
# pip install openpyxl
df = pd.read_excel('./sample23.xlsx', 'Sheet0', header=None)
def change(x):
try:
if x != 'abcd|xyzzz' and x == 'Loan No.':
return x
elif x == 'abcd|xyzzz':
return 'xyzzz'
except Exception as e:
return x
df[6] = df.apply(lambda row: change(row[6]), axis=1)
df.to_excel("test.xlsx",sheet_name='Sheet0', header=None, index=None)
df.head(10)