I have imported a csv to pandas' data frame.
Work Product Version
0 LCR_ContractualOutflowsMaster.aspx 1.1
1 LCR_CountryMaster.aspx 1.1
2 WBR_LCR_ContOutflowsMaster 1.0
3 USP_WBR_LCR_CountryMaster 1.0
Then then data frame was inserted in to a python dictionary.
{'LCR_ContractualOutflowsMaster.aspx': [1.1], 'LCR_CountryMaster.aspx': [1.1], 'WBR_LCR_ContOutflowsMaster': [1.0], 'USP_WBR_LCR_CountryMaster': [1.0]}
There are two keys which have common maximum value 1.1
. Is there a way to print out these two keys into a list?
I have tried some methods such as (referred from some stack overflow queries)
1) max_value = max(csv_dict.items(), key=operator.itemgetter(1))[0]
2) max_value = max(csv_dict.items(), key=lambda x: x[1])[0]
3) max_value = max(csv_dict.values()); {key for key, value in csv_dict.items() if value == max_value}
4) max_value = max(csv_dict, key=csv_dict.get)
It is only printing one value.
Regards