File size: 467 Bytes
2465927
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b699ae9
2465927
b699ae9
2465927
b699ae9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import pandas as pd
import vizro.plotly.express as px

pastries = pd.DataFrame(
    {
        "pastry": [
            "Scones",
            "Bagels",
            "Muffins",
            "Cakes",
            "Donuts",
            "Cookies",
            "Croissants",
            "Eclairs",
        ],
        "Profit Ratio": [-0.10, -0.05, 0.10, 0.05, 0.15, -0.08, 0.08, -0.12],
    }
).sort_values("Profit Ratio")

fig = px.bar(pastries, x="Profit Ratio", y="pastry")