Python 字段合并
2017-08-27 本文已影响0人
正在充电Loading

from pandas import read_csv
df = read_csv(
'D:\\PDA\\4.11\\data.csv',
sep=" ",
names=['band', 'area', 'num']
)

df = df.astype(str)

tel = df['band'] + df['area'] + df['num']

df['tel'] = tel

from pandas import read_csv
df = read_csv(
'D:\\PDA\\4.11\\data.csv',
sep=" ",
names=['band', 'area', 'num']
)
df = df.astype(str)
tel = df['band'] + df['area'] + df['num']
df['tel'] = tel