Solved by aneeshaasc in post #6 
              
              
                Actually… there’s an even better way. PyG has something in-built to convert the graph datasets to a networkx graph. 
import networkx as nx
import torch
import numpy as np
import pandas as pd
from torch_geometric.datasets import Planetoid
from torch_geometric.utils.convert import to_networkx

dataset…