Pandasにてcsvのデータを処理したいのですが、空白の場合NaNが変数にはいるようで、
下記のように空白の場合の判定をしようとしたところ文字列が入力されている場合はエラーがでてしまいます。
他に空白を判定するために良い方法はあるのでしょうか。
for index, row in df.iterrows(): email = row['email'] if np.isnan(email): print(email)
■ isnanのエラー内容
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
![guest](/img/icon/icnUserSample.jpg)
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/01/27 06:48
2021/01/27 06:51