我有一個包含電影名稱、預算、利潤和型別的 csv 檔案。有 15 種型別,但我只想繪制動作、冒險、喜劇、戲劇和影片這 5 種型別的預算。如何篩選屬于這些型別的電影?
uj5u.com熱心網友回復:
filter您可以使用from過濾 5 種型別dplyr,
target_genres <- c( 'action', 'adventure', 'comedy', 'drama', 'animation')
filtered <- df %>% filter(genres %in% target_genres)
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/469449.html
上一篇:格羅布根本沒有繪制或位置錯誤
