import yaml import pandas as pd def parse_wireviz_yml(file_path): # Load the WireViz YML file with open(file_path, 'r') as file: data = yaml.safe_load(file) # Extract the wires and their terminating points wires = data.get('wires', []) wire_info = [] for wire in wires: wire_name = wire.get('name') from_point = wire.get('from') to_point = wire.get('to') wire_info.append({ 'Wire Name': wire_name, 'From': from_point, 'To': to_point }) # Create a DataFrame to display the data as a table wire_df = pd.DataFrame(wire_info, columns=['Wire Name', 'From', 'To']) return wire_df # Path to your WireViz YML file file_path = 'your_wireviz_file.yml' wire_table = parse_wireviz_yml(file_path) # Display the table print(wire_table)