我有一个模糊的数据框,我想在其中删除“ selling_price”列中具有NAN值的所有行
image_features_df.head(3)
feat1 feat2 feat3 ... feat25087 feat25088 fid selling_price
0 0.0 0.0 0.0 ... 0.0 0.0 2 269.00
1 0.2 0.0 0.8 ... 0.0 0.3 22 NAN
2 0.5 0.0 0.4 ... 0.0 0.1 70 NAN
上表显示了我的数据框的视图。
我希望输出为dask数据框,而我的“ selling_price”列中没有任何NAN单元。
预期输出:
image_features_df.head(3)
feat1 feat2 feat3 ... feat25087 feat25088 fid selling_price
0 0.0 0.0 0.0 ... 0.0 0.0 2 269.00
4 0.3 0.1 0.0 ... 0.0 0.3 26 1720.00
6 0.8 0.0 0.0 ... 0.0 0.1 50 18145.25
答案 0 :(得分:1)
请尝试以下操作,如果在Selling_price列中找到NaN,则会删除行。
# Im just guessing the name of the helper
<%= link_to 'Edit', profiles_edit_path(user: { form: 'address' }) %>