Skip to content

Instantly share code, notes, and snippets.

@ReedJessen
Last active April 14, 2016 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ReedJessen/840ee6f426ec6c5cbead288726ff2e3c to your computer and use it in GitHub Desktop.
Save ReedJessen/840ee6f426ec6c5cbead288726ff2e3c to your computer and use it in GitHub Desktop.
Extract only the names of entity nodes from the Panama Papers
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