Back to prompt library
PyG Graph Data Builder
Linked challenge: Maritime Supply Chain Port Congestion Predictor with Graph Neural Networks and PyTorch Geometric
Prompt source
implementation1 lines1 sectionsNo variables0 checklist items
Write a Python function `build_maritime_graph(nodes_df, edges_df)` returning a `torch_geometric.data.Data` object with node features and edge indices.