Skip to content

Instantly share code, notes, and snippets.

# Add uniqueness constraint.
neo4j.CypherQuery(graph, "CREATE CONSTRAINT ON (c:Country) ASSERT c.name IS UNIQUE").run()
# Put all country names into a list called countries.
countries = []
for i in range(len(airlines)):
countries.append(airlines[i][1])
# Convert list of country names to a set to get a unique set of values.

The World Cup Graph

Initial Data Setup