<｜begin▁of▁sentence｜>### Instruction:
Given edge data with sources, targets, and weights, and vertex data with names and attributes, can you use the Graph.DataFrame function from igraph to create an undirected graph and print its summary?
### Response:
import igraph as ig
import pandas as pd

# Assume we have the following edges and vertices data
edges_data = {'source': [0, 1, 2], 'target': [1, 2, 0], 'weight': [4, 5, 6]} 
vertices_data = {'name': ['A', 'B', 'C'], 'attribute': ['X', 'Y', 'Z']}

# Create a DataFrame for edges and vertices
edges_df = pd.DataFrame(edges_data)
vertices_df = pd.DataFrame(vertices_data)

# Generate the graph from the DataFrames
graph = ig.Graph.DataFrame(edges_df, directed=False, vertices=vertices_df)

# Print the graph summary
print(graph.summary())
<|EOT|>
