I'm analyzing Political Advertisements from Facebook, which is a dataset released here, by ProPublica.
Here's what I mean. I have an entire column of targets that I want to analyze but it's formatted in a very inaccessible way for someone of my skill level.
This is from just 1 cell:
[{"target": "NAge", "segment": "21 and older"}, {"target": "MinAge", "segment": "21"}, {"target": "Retargeting", "segment": "people who may be similar to their customers"}, {"target": "Region", "segment": "the United States"}]
and another:
[{"target": "NAge", "segment": "18 and older"}, {"target": "Location Type", "segment": "HOME"}, {"target": "Interest", "segment": "Hispanic culture"}, {"target": "Interest", "segment": "Republican Party (United States)"}, {"target": "Location Granularity", "segment": "country"}, {"target": "Country", "segment": "the United States"}, {"target": "MinAge", "segment": 18}]
What I need to do is to separate every "target" item to become the column label with each of its corresponding "segment" to be a possible value within that column.
Or, is the solution to create a function to call each dictionary key within each row to count frequency?