【发布时间】:2017-07-11 09:41:14
【问题描述】:
id name country
1 AAA Afghanistan
2 BBB Australia
这是我的数据框↑
如何让国家变成↓
id name country Newcountry
1 AAA Afghanistan Afg
2 BBB Australia Aus
我想从国家列值中获取 3 个单词并添加到 Newcountry 列,怎么办?
【问题讨论】:
标签: python python-3.x pandas dataframe