I have a dataset of film with several columns, one of which is a column for country. Because some films are produced by more than one country, the film can have different countries at the same time in the "country" column. For example, enter image description here
I now want to create a new dataset in which each row in “country” column can only has one country. For example, in the screenshot above, Bluebeard are produced by “France”, “Germany”, and “Italy” country. Right now, I want the dataset showing that Bluebeard is produced by “France”, “Germany”, and “Italy” country separately.
I tried strsplit()and colsplit() function, but that doesn’t seem to convert comma-separated "country" column into multiple columns that only contain one country each row.
Any suggestions?
Thank you!