Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0474a2c

Browse files
Update 03-数据表清洗.md
1 parent 1d5c809 commit 0474a2c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎03-数据表清洗.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ df['city']=df['city'].str.lower() #小写
261261
df['city']=df['city'].str.swapcase() #大小写互换
262262
df['city']=df['city'].str.capitalize() #首字母大写
263263
df['city']=df['city'].str.title() #字符串中的每个单词首字母大写
264+
265+
df.columns = df.columns.map(lambda x: x.lower()) #将列名统一改为小写
264266
```
265267

266268
<br/>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /