# Connect to Neo4j (adjust credentials as needed) graph = Graph("bolt://localhost:7687", auth=("neo4j", "YOUR_PASSWORD")) # replace this with your password # Clear existing data (optional) graph.run("MATCH (n) DETACH DELETE n")