Whilst applying the below function I have bool values converted to integers.
What am I missing?
import pandas as pd
def multi(x):
if isinstance(x, (float, int)):
return x * 10
return x
print(pd.DataFrame(data={"a": [True, False]}).applymap(func=multi))
Ouput:
a
0 10
1 0
Expected:
a
0 True
1 False