エントリーの編集
![loading...](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/common/loading@2x.gif)
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
<Python> Nanの判定の仕方。 - ねこゆきのメモ
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
![アプリのスクリーンショット](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/entry/app-screenshot.png)
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
<Python> Nanの判定の仕方。 - ねこゆきのメモ
Nan (Not a number) を判定する方法。 2種類ほどあるらしい。。 math.isnan() を使うか、同じ値を比較... Nan (Not a number) を判定する方法。 2種類ほどあるらしい。。 math.isnan() を使うか、同じ値を比較。 In [1]: import pandas as pd In [2]: import math In [4]: df = pd.DataFrame(index=[0,1,2,3], columns=[0,1,2,3]) In [5]: df.ix[3,3]=5 In [6]: df Out[6]: 0 1 2 3 0 NaN NaN NaN NaN 1 NaN NaN NaN NaN 2 NaN NaN NaN NaN 3 NaN NaN NaN 5 In [7]: type(df.ix[0,0]) Out[7]: float In [8]: type(df.ix[3,3]) Out[8]: int In [9]: math.isnan(df.ix[0,0]