This report analyzes the Netflix dataset to find which six actors have the most appearances in TV Shows.
Netflix.csv).cast column so that each actor appears in
a separate row.cast to actor.TV Show type.library(dplyr)
library(tidyr)
# Load dataset
Netflix <- read.csv("Netflix.csv")
# Transform dataset: separate cast into rows, drop NA, and rename
Netflix_Actor <- Netflix %>%
separate_rows(cast, sep = ", ") %>%
drop_na(cast) %>%
rename(actor = cast)
# Find top 6 actors in TV Shows
Top_Actors <- Netflix_Actor %>%
select(type, actor) %>%
filter(type == "TV Show") %>%
group_by(actor) %>%
count(sort = TRUE) %>%
ungroup() %>%
head(6)
Top_Actors
## # A tibble: 6 × 2
## actor n
## <chr> <int>
## 1 "" 210
## 2 "Takahiro Sakurai" 18
## 3 "Yuki Kaji" 16
## 4 "Daisuke Ono" 14
## 5 "David Attenborough" 14
## 6 "Ashleigh Ball" 12
The six actors with the most appearances in TV Shows are: