library(tidyverse) Netflix <- read_csv(“Netflix.csv”)

Netflix_Actor <- Netflix %>% separate_rows(cast, sep = “,”) %>%
drop_na(cast) %>%
rename(actor = cast)

Netflix_Actor %>% select(type, actor) %>%
filter(type == “TV Show”) %>%
group_by(actor) %>%
count(sort = TRUE) %>%
ungroup() %>% head(6)

Top6_Actors <- Netflix_Actor %>% select(type, actor) %>% filter(type == “TV Show”) %>% group_by(actor) %>% count(sort = TRUE) %>% ungroup() %>% head(6)

Top6_Actors

Top6_Actors %>% ggplot(aes(x = reorder(actor, n), y = n, fill = actor)) + geom_col(show.legend = FALSE) + coord_flip() + labs( title = “Top 6 Most Frequent Actors in Netflix TV Shows”, x = “Actor”, y = “Number of Appearances” ) + theme_minimal()