There are some questions about how to create two plotly graphs side-by-side in Jupyter notebook or how to show two pandas dataframes side by side. But I would like to display a plotly graph with a pandas dataframe side by side in a Jupyter notebook. Here is some reproducible code for the graph and pandas dataframe:
import pandas as pd
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x="sepal_width", y="sepal_length")
fig.show()
# Simple pandas dataframe
df[["sepal_length", "species"]].groupby("species").agg(['mean', 'count', 'median', 'min', 'max'])
Output:
Now the output is below each other, but I would like to have them side by side. So I was wondering if anyone knows how to show a plotly graph side by side with a pandas dataframe?