import h5py import pandas as pd import numpy as np import plotly.graph_objects as go f = h5py.File('product1.h5','r') list(f.keys()) for key in f.keys(): print(f[key]) # print(f[key].shape) # print(f[key].value) df = pd.read_hdf('product1.h5', key='df8') print(df) # Calculate the standard deviation using pandas' function std_dev_unit = df.groupby('Zip Code')['Unit Price'].std() std_dev_displayed = df.groupby('Zip Code')['Shown Price'].std() # Generate the graph using Plotly fig = go.Figure() fig.add_trace(go.Bar(x=std_dev_unit.index, y=std_dev_unit.values)) fig.update_layout(title='Standard Deviation of the Unit Pricing by Item', xaxis_title='Zip Code', yaxis_title='Standard Deviation') report_file = 'test.html' fig.write_html(report_file)