I am working on the movies dataset and a column for Genres has a very complicated format. It is of type Object with an embedded dictionary. The format looks like JSON format. SO the genres column is a series of json values .A typical value in the first 2 cells are as follows:
Cell1: '[{"id": 12, "name": "Adventure"}, {"id": 14, "name": "Fantasy"}, {"id": 28, "name": "Action"}]' Cell2: '[{"id": 28, "name": "Action"}, {"id": 12, "name": "Adventure"}, {"id": 80, "name": "Crime"}]'
Now I want to extract these genres i.e values for the key name into a list. For eg: the first cell should contain [Adventre,Fantasy,Action] second cell should contain [Action,Adventure,Crime]
I tried with some string methods, but it didn't work. I also read about the library ast, but I have no idea about the same. How do I achieve the above result??
Thanks