Pandas 文本数据方法 findall( )

时间:2025-02-11 12:22:10

(pat, flags=0, **kwargs)返回要查询的内容
参数:
pat : 字符串或正则
flags : 整型,
返回:
序列Series/索引Index of lists

import pandas as pd
s = (['A', 'B', 'C', 'Aaba', 'Baca', 'CABA', 'dog', 'cat'])
print(("A"))
0       [A]
1        []
2        []
3       [A]
4        []
5    [A, A]
6        []
7        []
dtype: object