如何在 Python 中小写列?

问题描述 投票:0回答:1

the screenshot of the error attached

大家好! 我做错了什么?

我需要小写列名并消除空格。 使用 .lower 方法后,我收到错误“Index”对象没有属性“lower”

python pandas analytics
1个回答
-1
投票

例如:

df['A'] = df['A'].str.lower()
© www.soinside.com 2019 - 2024. All rights reserved.