KOTA ITO

Generation

generate functionWed, 07 Dec 2022

データフレームの文字列の正規表現を抽出する

def get_str_with_regexp(df, col, regexp): return df[col][df[col].str.contains(regexp)]

Questions about programming?Chat with your personal AI assistant