apply regex to list of columns pandas code example
Example 1: pandas show column with regular expression
# Total items starting with F
S.str.count(r'(^F.*)').sum()
Example 2: pandas show column with regular expression
S=pd.Series(['Finland','Colombia','Florida','Japan','Puerto Rico','Russia','france'])
[itm[0] for itm in S.str.findall('^[Ff].*') if len(itm)>0]