过滤CSV文件后,我得到了以下代码:
import pandas as pd
data1=pd.read_csv('Report1.csv',encoding = "ISO-8859-1")
df = data1[pd.notnull(data1['Assignee'])]
group=(df['type'].value_counts())
print(group)
但是当 csv 看起来像这样时,我被困在这里:
Type Assignee status
request madan assigned
ris madan resolved
request kumar resolved
incide kumar assigned
incide madan assigned
我需要输出为:
madan has 2 assigned and 1 resolved (1 request, 1 ris , 1 inciden)
kumar has 1 assigned and 1 resolved (1 request , 1 incident )
请帮忙。提前致谢。
阿晨1998
相关分类