I have a df tthat one of the columns is a set of words. How I can make them lower case in the efficient way? The df has many column but the column that I am trying to make it lower case is like this:
B
['Summer','Air Bus','Got']
['Parmin','Home']
Note:
In pandas I do df['B'].str.lower()
2条答案
按热度按时间iyfamqjs1#
如果我没理解错的话,你有一个列,它是一个字符串数组。
要降低字符串,可以这样使用
lower
函数:结果:
toiithl62#
与@vladsiv的答案略有不同,它试图回答上面注解中关于传递动态列名的问题。