I'm having a syntax error when applying the lambda function, however, I'm using the same lambda structure as in other functions. Is it an issue with the apply function on pandas?
for column in list2:
print(column[-1])
data[f'{column}'] = data[f'{column}'].apply(lambda x: str(x).replace('.','').replace('M','0000000') if (x[-1] == 'M'))
data[f'{column}'] = data[f'{column}'].apply(lambda x: str(x).replace('.','').replace('B','0000000000') if (x[-1] == 'B'))