0

IMDB data set is given- Extract the unique genres and its count and store in data frame with index key.
please help me out how to store in data frame with index key. I am new to R.

I tried to create data frame but not able to get how to get index value? This is confusing me

unique values of genres

unique(df$Genre)

count of unique values of variable Genre

length(unique(df$Genre))

Extract the unique genres and its count and store in data frame with index key.

NelsonGon
  • 13,015
  • 7
  • 27
  • 57
  • 1
    Could you share a sample of your data with `dput` and exactly what do you mean by index? See [here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) how to formulate this and future questions better. – NelsonGon Apr 26 '19 at 17:27
  • 1
    Please try `table(df$Genre)` (or `data.frame(table(df$Gender))` to make a data.frame) – pogibas Apr 26 '19 at 17:28
  • ok and the question says store in data frame with index key...whats that? – puja Samanta Apr 27 '19 at 03:48

0 Answers0