我有两个具有不同列名的数据框,我需要附加
A = c("Q","W","E")
B =c(12,23,31)
df1 = data.frame(A,B)
A = c("R","T","Y")
B =c(3,111,21)
C= c(5,9,3)
df2 = data.frame(A,B,C)
我正在尝试在rbindlist(data.table)
sqldf
功能
samp = rbindlist(list(df1,df2),fill=T)
以下代码中的任何修改
samp= sqldf ("insert into df1 select * from df2")
我得到的错误是:
rsqlite_send_query中的错误(conn @ ptr,statement): 表df1有2列,但提供了3个值“
答案 0 :(得分:0)
我们可以创建虚拟列,然后import requests
from scrapy import Selector
req = requests.get(some_url, headers=user_agent)
hxs = Selector(req)
links = hxs.xpath('//meta[@property="x:y:z"]@content')
:
UNION ALL