0
をeveryline:パンダは、私がデータフレームを持っている正規表現
#!/usr/bin/python
# encoding=utf-8
df=pandas.DataFrame([[1,2,'2015-11入住,2015-11-12离开'],[2,3,'2016-11入住,2016-11-2离开']],columns=['a','b','c'])
print df
私は結果を取得したい:私はこのexprssionがERRORである知っている、私は正規表現
df.c=re.search('((\d+)-){2}(\d+)',df.c).group()
を使用したい
a b c
0 1 2 2015-11-12
1 2 3 2016-11-2
を: reモジュールはstrに使用されていますが、df.cはpandas.seriesですが、私はpandasのすべての行に正規表現を書く方法を知らない