标签:gmail flag pre TE get find series type ignore
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
标签:gmail flag pre TE get find series type ignore
原文地址:https://www.cnblogs.com/ziheIT/p/9165000.html