df が
Date A B C 1 2016-01-01 10.0 0.0 inf 2 2016-01-02 12.0 0.0 inf 3 2016-01-03 14.0 0.0 inf 4 2017-01-04 16.0 NaN NaN 5 2017-01-05 12.0 NaN NaN 6 2017-01-06 13.0 NaN NaN 7 2017-01-07 14.0 NaN NaN
のようになっています。
df['B']=df['B'].replace([np.inf, -np.inf], np.nan) df['C']=df['C'].replace([np.inf, -np.inf], np.nan) df[np.isnan(pv_cv_df)] = 0
とコードを書いて実行すると、
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'' とエラーが出ます。
なぜうまくいかないのでしょうか?
どのように修正すればいいのでしょうか?

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/09/10 06:59 編集