<｜begin▁of▁sentence｜>### Instruction:
Given a pandas DataFrame 'edges' with columns 'source', 'target', and 'weight', representing the source node, target node, and weight of edges in a graph respectively, how can we convert it into a NetworkX Graph and access the weight of the edge between nodes 1 and 2?
### Response:
import pandas as pd
import networkx as nx

# Create a pandas DataFrame with edge information
edges = pd.DataFrame({'source': [1, 1, 2, 2, 3], 'target': [2, 3, 3, 4, 4], 'weight': [3, 4, 5, 6, 7]})

# Convert the pandas DataFrame into a NetworkX Graph
G = nx.from_pandas_edgelist(edges, 'source', 'target', ['weight'])

# Access the 'weight' attribute of the edge between nodes 1 and 2
weight_1_2 = G[1][2]['weight']
print(f'Weight of edge between node 1 and 2: {weight_1_2}')
<|EOT|>
