Last active
April 14, 2016 21:16
-
-
Save ReedJessen/840ee6f426ec6c5cbead288726ff2e3c to your computer and use it in GitHub Desktop.
Extract only the names of entity nodes from the Panama Papers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
#read csv to workable list | |
with open('nodes.csv', 'r', encoding="utf-8") as raw: | |
reader = csv.reader(raw, delimiter=";") | |
entities_raw = list(reader) | |
#create empty list to be filled with names | |
entities_name_only = [] | |
#add names of all nodes catagorized as "ENTITY" | |
for entity in entities_raw: | |
if entity[1] == "ENTITY": | |
entities_name_only.append(entity[2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment