CommencerCommencer gratuitement

Joining a data.frame

The netflix and imdb datasets have been loaded into your R session. Your goal is to add IMBD ratings to all series in the netflix dataset, but this time netflix has been loaded in as a data.frame instead of a data.table.

Cet exercice fait partie du cours

Joining Data with data.table in R

Afficher le cours

Instructions

  • Convert netflix to a data.table using the as.data.table() (docs) function so that its rownames become a column named "series".
  • Right join the new data.table you've just created,netflix_dt, to imdb using the data.table join syntax.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Convert netflix to a data.table
netflix_dt <- ___

# Right join
___
Modifier et exécuter le code