1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

csvに含まれるnanを無視する

Last updated at Posted at 2018-10-29

#背景
50音のローマ字をcsvでデータにまとめ、pandasで読み取るとき、
や行やワ行に含まれる空白が「NAN」という文字として扱われてしまう
空白は空白として扱いたい。
#解決方法
df = df.fillna('')
を使って、読み取ったデータフレームのスペースを''に変換すればOK

nanの削除などは複数記事があったが置き換える記事がなかったのでメモ

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?