df['market_category_name'].astype('category').cat.dode
df['market_category_name'].astype('category').cat.categories[arr_pre][0]
def arg_max(data):
arr_pre = []
for d in data:
output = d
f = lambda i: output[i]
arr_pre.append(max(range(len(output)), key=f))
return df['market_category_name'].astype('category').cat.categories[arr_pre][0]