📅  最后修改于: 2022-03-11 14:46:50.057000             🧑  作者: Mango
import pandas as pd
import numpy as np
x = str(np.arange(1,100))
df = pd.DataFrame([x,x,x,x])
df.columns = ['words']
print 'sample'
print df.head()
result = df['words'].apply(lambda x:
np.fromstring(
x.replace('\n','')
.replace('[','')
.replace(']','')
.replace(' ',' '), sep=' '))
print 'result'
print result