how can I sort this code by fraudulent:enter image description here
df.pivot_table('fraudulent', index=['industry'], aggfunc=['count', 'mean']).sort_values(by='fraudulent', ascending=False)
and I got this error KeyError: 'fraudulent'
how can I sort this code by fraudulent:enter image description here
df.pivot_table('fraudulent', index=['industry'], aggfunc=['count', 'mean']).sort_values(by='fraudulent', ascending=False)
and I got this error KeyError: 'fraudulent'