ValueError NA / NaN values 2022年4月27日 / 1 min read View more blogs with the tag pandas , View more blogs with the tag python Table of Contents #問題 #解決方法 問題 df = df[df['hoge'].str.contains('fuga')] ここで以下のエラーが出ました。どうやら hoge 列に NaN が含まれていることが原因みたいです。 ValueError: Cannot mask with non-boolean array containing NA / NaN values 解決方法 na=False を付ければ OK df = df[df['hoge'].str.contains('fuga', na=False)]