我正在尝试运行此代码,此错误正在发生

时间:2018-02-20 16:46:24

标签: python pandas

python版本2.7.12

import pandas as pd  
df = pd.read_csv("/home/vipul/example.csv", sep=',')  
v = df.pop('address').str.split('\s*\+.*?-\s*', expand=True)  
v.columns = ['city', 'position', 'country']  
df = pd.concat([df, v], 1)  
df.to_csv("/home/vipul/new.csv")` 

错误

AttributeError: 'Series' object has no attribute 'str'

0 个答案:

没有答案