import pandas as pd
df = pd.DataFrame([{"email": "test@gmail.com"}])
is_upper = lambda x: x.upper() if isinstance(x, str) else x
df = df.applymap(trim_strings)
a = df.to_dict("records")
The response I get :
[{'email': 'test@gmail.com'}]
The response I expected :
[{'email': 'TEST@GMAIL.COM'}]
What can be the issue here?