Series.str.str.str方法
Posted ziheit
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Series.str.str.str方法相关的知识,希望对你有一定的参考价值。
In [29]: aaa Out[29]: Dave [dave, oogle.com] Rob [rob, mail.com] Steve [steve, mail.com] Wes NaN dtype: object In [30]: aaa.str.get(0) Out[30]: Dave dave Rob rob Steve steve Wes NaN dtype: object In [31]: aaa.str[0] Out[31]: Dave dave Rob rob Steve steve Wes NaN dtype: object In [32]: data.str.findall(pat,flags=re.IGNORECASE) Out[32]: Dave [(dave, google, com)] Rob [(rob, gmail, com)] Steve [(steve, gmail, com)] Wes NaN dtype: object In [33]: data.str.findall(pat,flags=re.IGNORECASE).str[0] Out[33]: Dave (dave, google, com) Rob (rob, gmail, com) Steve (steve, gmail, com) Wes NaN dtype: object In [34]: data.str.findall(pat,flags=re.IGNORECASE).str[0][0] Out[34]: (‘dave‘, ‘google‘, ‘com‘) In [35]: data.str.findall(pat,flags=re.IGNORECASE).str[0].str[0] Out[35]: Dave dave Rob rob Steve steve Wes NaN dtype: object In [36]: data.str.findall(pat,flags=re.IGNORECASE).str[0].str[0].str[0] Out[36]: Dave d Rob r Steve s Wes NaN dtype: object
以上是关于Series.str.str.str方法的主要内容,如果未能解决你的问题,请参考以下文章
javascript Genera un array que contiene la serie de fibonacci hastaelnúmeroindado
php WhereHas ou has com or dentro de uma serie de Wheres(Exemplo dosElementosGráficos)