python - Not getting Exact result in pandas -
df=pandas.dataframe(processed_data_format, columns=["file_name", "innings", "over","ball", "individual ball", "runs","batsman", "wicket_status","bowler_name","fielder_name"]) = {'runs':['sum'],'ball':['sum'],'file_name':['unique']} t = df.groupby('batsman').agg(a)
after running code getting result like
['younis khan', array(['225245', '225247'], dtype=object), 113, 121]
but result like
['younis khan', 2 , 113, 121]
instead of array(['225245', '225247'], dtype=object) need count of file name
Comments
Post a Comment