Pandas Show Column dengan Ekspresi Reguler
S=pd.Series(['Finland','Colombia','Florida','Japan','Puerto Rico','Russia','france'])
S.str.contains('^F.*')
Wide-eyed Wren
S=pd.Series(['Finland','Colombia','Florida','Japan','Puerto Rico','Russia','france'])
S.str.contains('^F.*')
import numpy as np
df['first_five_Letter']=df['Country (region)'].str.extract(r'(^\w{5})')
df.head()
# Total items starting with F
S.str.count(r'(^F.*)').sum()
df[df['Country (region)'].str.count('^[pP].*')>0]