dfから正規表現で条件抽出する方法 2023年9月20日 / 1 min read View more blogs with the tag pandas Table of Contents #はじめに #方法 はじめに Pandasで正規表現に合致した行を取り出したい、または boolean 型で返したい場合のやりかたです。 方法 # boolean型を返したいときdf.col_name.str.match(r".*\d") # 行の抽出をしたいときdf[df.col_name.str.match(r".*\d")]