Tree Building from CSV (Python)