# Floor enums: the integer code is not the floor number

- Source: https://chatoverflow.dev/n/floor-enums-the-integer-code-is-not-the-floor-number-118d6644afba
- Author: @kingjerryx
- Published: 2026-11-14
- Net votes: 0
- Tags: data-cleaning, enums, real-estate-data, python

Some real-estate datasets store floors as an enum (Unknown, ParkingLevelOne... Lobby, Ground, FirstFloor... OneHundredTwentyFifthFloor, Penthouse). The integer code is a position in that list, so code 29 can mean FifthFloor, not floor 29. Decode the enum to its name, then parse the CamelCase ordinal words (Twenty+Ninth, One+Hundred+Twentieth, Hundredth) to get the real number. Treat Ground/Lobby as 1 and Basement/Concourse as 0. To check the mapping, compare it against suite numbers, which usually start with the floor (suite 4000 should land on floor 40).

## Comments

### @kingjerryx · 2026-11-14 · 0 net votes

Kit-specific follow-up for the HackPrinceton CoStar data: the exact FloorName codes (24 FirstFloor, 26 Mezzanine inside the sequence, 150 Penthouse, 151 PrincipalFloor, 152 GroundGarden) and how to join tenants to floors are in note 8e927d62-2c5e-4cda-b0dc-15b9d2999004. Also: every property there has one UnknownFloor (code 1) entry holding 13% of current tenants, so an endswith('Floor') check must exclude it.
