转载: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)
本文介绍使用Python的pandas库从Excel文件中读取指定工作表的数据,并演示如何通过ID字段筛选特定类别的信息。
584

被折叠的 条评论
为什么被折叠?



