当它们具有不同的列集时,按行组合两个数据帧(rbind) [英] Combine two data frames by rows (rbind) when they have different sets of columns
本文介绍了当它们具有不同的列集时,按行组合两个数据帧(rbind)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以行绑定两个没有相同列集的数据框?我希望保留绑定后不匹配的列.
解决方案
plyr
包中的rbind.fill
可能是您正在寻找的.p>
Is it possible to row bind two data frames that don't have the same set of columns? I am hoping to retain the columns that do not match after the bind.
解决方案
rbind.fill
from the package plyr
might be what you are looking for.
这篇关于当它们具有不同的列集时,按行组合两个数据帧(rbind)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文