Box plots

kind='box'.

df.plot(..., kind="box").

Goal

Draw this kind four ways.

df = pd.DataFrame({
    "city": ["Nairobi", "Mombasa", "Kisumu", "Nakuru", "Eldoret"],
    "units": [21, 15, 15, 18, 12],
    "shillings": [2100, 1500, 1480, 1750, 1190],
})
df.plot(y="units", kind="box")
plt.title("box")
plt.show()
rng = np.random.default_rng(0)
df = pd.DataFrame({
    "Nairobi": rng.integers(8, 22, size=30),
    "Mombasa": rng.integers(2, 16, size=30),
})
df.plot(kind="box")
plt.title("box")
plt.show()
df = pd.DataFrame({
    "city": ["Nairobi", "Mombasa", "Kisumu", "Nakuru", "Eldoret"],
    "units": [21, 15, 15, 18, 12],
    "shillings": [2100, 1500, 1480, 1750, 1190],
})
print(df.head())
df.plot(x="city", y="shillings", kind="box")
plt.show()
print("kind=box")