如何在 R 中加入两个 csv 文件并匹配两个表中的数据?

How to join two csv files in R and match the data from both tables?

我有两个 csv 文件

csv 1 有这个数据

csv 2 将其作为数据

我想使用正确的剧集名称将剧集评论列从 csv 2 添加到 csv 1。我怎么能完成这个?感谢任何帮助

编辑:这是让它工作的代码

library(tidyverse)
library(rvest)
library(dplyr)

df1 = read.csv('NewEpisodes.csv', head = T)
df2 = read.csv('episodesReview.csv', head = T, )


dfLeft = df1 %>% left_join(df2, by=c("Episode.Name", "Show.Name"))

试试这个:

final_csv = merge(csv_1, csv_2, by = c("Show.Name", "Episode.Name"))