如何使用左列的数据作为参考填充NA
id喜欢寻求帮助以修复熊猫数据框中(python)中的丢失值
在此数据集中,我在['item_weight']列中找到了一个缺少的值。
我不想放下缺失的值,因为我通过对它们进行排序。缺少的值是编码它的人的“小姐类型”。
现在我创建了一个查找数据集,以便可以合并它们以填充NA缺失值。
我如何使用我制作的查找表合并或加入它们以填充缺失值(NAN)?还是没有使用查找表的其他方法?
Id like to ask for help in fixing the missing values in pandas dataframe (python)
In this dataset I found a missing value in ['Item_Weight'] column.
I don't want to drop the missing values because I found out by sorting them. the missing value is "miss type" by someone who encoded it.
Now I created a lookup dataset so I can merge them to fill na missing values.
How can I merge them or join them only to fill the missing values (Nan) using the lookup table I made? Or is there any other way without using a lookup table?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从中看,您可能希望使用
MAP
而不是JOIN/MERGE
使用的内容,这是如何将映射与数据一起使用的示例。由于您使用了屏幕截图,因此我必须创建自己的数据框。将来,屏幕截图的使用被认为是帮助开发人员提供帮助的最佳选择。
Looking at this you will probably want to use something along the lines of
map
instead ofjoin/merge
this is an example of how to use map with your data.I had to create my own dataframes since you used screenshots. In the future, the use of screenshots is not considered best to help developers with assistance.
这可能会起作用:
但是我无法对其进行测试,因为您没有给我们任何工作。
This will probably work:
But I can't test it since you didn't give us anything to work with.