Series.str.findall(pat, flags=0, **kwargs)返回要查询的内容
参数:
pat : 字符串或正则
flags : 整型,
返回:
序列Series/索引Index of lists
import pandas as pd
s = pd.Series(['A', 'B', 'C', 'Aaba', 'Baca', 'CABA', 'dog', 'cat'])
print(s.str.findall("A"))
0 [A]
1 []
2 []
3 [A]
4 []
5 [A, A]
6 []
7 []
dtype: object