How to lower all the elements in a pandas dataframe?
Either
df.applymap(str.lower)
Out:
X Y Z
0 a b d
1 c e c
Or
df.apply(lambda col: col.str.lower())
Out:
X Y Z
0 a b d
1 c e c
The first one is faster and it looks nicer but the second one can handle NaNs.