Series.str.findall(pat, flags=0, **kwargs)[source]
Parameters:
pat : string(Pattern or regular expression)
flags : int, default 0 (no flags)
re module flags, .
Returns:
matches : Series/Index of lists
1、查找单个单词
s = twitter_archive_enhanced_clean['text']
print(('doggo'))
0 []
1 []
2 []
3 []
4 []
5 []
6 []
7 []
8 []
9 []
10 []
11 []
12 []
13 []
14 []
15 []
16 []
17 []
18 []
19 []
20 []
21 []
22 []
23 []
24 []
25 []
26 []
27 []
28 []
29 []
...
1964 []
1965 []
1966 []
1967 []
1968 []
1969 []
1970 []
1971 []
1972 []
1973 []
1974 []
1975 []
1976 []
1977 []
1978 []
1979 []
1980 []
1981 []
1982 []
1983 []
1984 [doggo]
1985 []
1986 []
1987 []
1988 []
1989 []
1990 []
1991 []
1992 []
1993 []
Name: text, dtype: object