python动态处理Excel(将一列拆分成多列)
import pandas as pdword = ['学生','老师'] # 关键词book = pd.read_excel('1.xlsx',engine='openpyxl') # 读取excelfor idx, row in book.iterrows(): try: work = str(row['工作单位']) for w in word: if w in work: workLen = l