0
点赞
收藏
分享

微信扫一扫

dataframe按某列拆分

星巢文化 2022-03-26 阅读 165
python

转载: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)
举报

相关推荐

0 条评论