转载:https://www.cnblogs.com/zmc940317/p/13606748.html
代码:
import pandas as pd
df = pd.read_excel(r'./1.xlsx',sheet_name = 'Sheet2')
classInformation = df['ID'].unique()
for temp in classInformation:
temp_data = df[df['ID'].isin([temp])]
# print(temp_data)