我试图从两个不同的网站上抓取电影集
我想把这两个信息结合起来,用电影的片名把它们联系起来。下面是第一个数据集
structure(list(event_name = c("maze runner: the death cure", "star wars: the last jedi",
"spider-man: homecoming"), event_start_time = structure(c(100,
200, 300), class = "Date"), movie_sold_all = c(100L, 200L,
300L)), .Names = c("event_name", "event_start_time", "movie_sold_all"
), row.names = c(NA, 3L), class = "data.frame")
这是我收集的第二个数据集
我必须上传图像,因为有>10列
我希望能加入
movie_title
所以他们会把这两个信息结合起来。基本相似
left join
在SQL中
我试过了
merge( df_bq_movies,movies,by.y="movie_title",all.x = TRUE)
但出现了错误
Error in merge.data.frame(df_bq_movies, movies, by.y = "movie_title", :'by.x' and 'by.y' specify different numbers of columns
有关详细信息,这是数据集的维度
data 1 : 605 rows , 3 column
data 2 : 509 rows , 21 column