DEV Community

Gladori
Gladori

Posted on

Which Caribbean island is most likely to come with a chef? Share of inventory in a few lines of pandas

Raw counts mislead whenever the groups are different sizes. Here's a small, real example from villa rental data: "which island has the most villas with a private chef?" is easy to answer, but it's the wrong question for most travellers.

The data

These are the published counts from the Gladori catalogue of 782 Caribbean villas as of mid-November 2026: total homes per destination, plus the top three destinations in each collection.

import pandas as pd

homes = pd.Series({
    "St. Barts": 313, "Barbados": 160, "St. Martin": 108,
    "Turks and Caicos": 78, "Dominican Republic": 66,
    "Jamaica": 47, "Anguilla": 10,
})
assert homes.sum() == 782

collections = pd.DataFrame([
    ("chef", "Barbados", 106), ("chef", "Jamaica", 44), ("chef", "Dominican Republic", 35),
    ("staffed", "Barbados", 91), ("staffed", "Dominican Republic", 50), ("staffed", "Turks and Caicos", 48),
    ("beachfront", "Turks and Caicos", 27), ("beachfront", "Barbados", 28), ("beachfront", "St. Martin", 18),
    ("large_group", "Barbados", 54), ("large_group", "St. Barts", 42), ("large_group", "Turks and Caicos", 35),
], columns=["collection", "island", "n"])
Enter fullscreen mode Exit fullscreen mode

Counts versus shares

collections["share"] = collections["n"] / collections["island"].map(homes)
print(collections.sort_values(["collection", "share"], ascending=[True, False])
      .assign(share=lambda d: (d.share * 100).round(1)))
Enter fullscreen mode Exit fullscreen mode
collection island n share %
beachfront Turks and Caicos 27 34.6
beachfront Barbados 28 17.5
beachfront St. Martin 18 16.7
chef Jamaica 44 93.6
chef Barbados 106 66.2
chef Dominican Republic 35 53.0
large_group Turks and Caicos 35 44.9
large_group Barbados 54 33.8
large_group St. Barts 42 13.4
staffed Dominican Republic 50 75.8
staffed Barbados 91 56.9
staffed Turks and Caicos 48 61.5

What flips

  • Chef: Barbados has the most chef villas, 106. But in Jamaica, 44 of 47 villas list a chef or cook, 93.6 %. If a cook is non-negotiable, Jamaica is the island where you barely have to filter.
  • Beachfront: Barbados has one more beachfront villa than Turks and Caicos, 28 vs 27, yet a beachfront house is twice as likely in Turks and Caicos: 34.6 % against 17.5 %.
  • Large groups: St. Barts has 42 villas with six bedrooms or more, but that's only 13.4 % of a very big catalogue. In Turks and Caicos it's 44.9 %.

Caveats

  • Only the top three islands per collection are published, so shares for the others are unknown, not zero.
  • A share says how likely a random listing on that island is to match. It says nothing about price or quality.
  • The denominators move as homes are added or removed, so rerun before quoting.

The pattern is general. Whenever someone ranks by raw count across groups of different sizes, divide first.

Top comments (0)