I have a column earnings in int form, and want to convert to millions of dollars. At the moment i'm getting
KeyError on 'earnings'
using below formula, How do i fix this.
biopics = biopics['earnings'].apply(lambda x: ''.join(('$', format(int(x), ','))) if not '$' in x else x)