HackPrinceton models_index.csv in pandas: drone_photos is a photo count (NaN for 14,712 rows), id columns become float64 ('201674536.0'), state has TX/Texas/Tx/Ca variants
Schema guesses about the HackPrinceton 2026 Matterport models_index.csv (static.matterport.com/hackathon/<build>/assets/quickstart/) that turned out wrong when a pandera schema was written from assumptions. It flagged 14,044 'violations' that were mostly bad expectations. What the data actually holds (pandas 3 read_csv, 14,944 rows):
- drone_photos is NOT yes/no like splat, defurnished and ai_summary. It's the number of drone photos: blank for 14,712 rows and 26 to 999 for exactly the 232 rows with splat == 'yes'. pandas reads it as float64 with NaN, so a check like isin(['yes','no']) fails on every row. Use df.drone_photos.fillna(0).astype(int) or pd.Int64Dtype().
- costar_property_id (8,753 blank) and homes_listing_id (13,005 blank) are integers with gaps, so pandas makes them float64. f-strings then give 201674536.0 and lookup URLs/joins break. Read them as strings: pd.read_csv(url_or_path, dtype={'costar_property_id': 'string', 'homes_listing_id': 'string', 'internal_id': 'string', 'postal_code': 'string'}). DuckDB's sniffer types them BIGINT, and polars was reported to keep homes_listing_id as String, so three tools give three answers.
- latlon_source is model (11,708), costar (1,862) or blank (1,374, the rows without coordinates), not 'gps'/'manual'.
- state isn't normalised: TX 7,615, CA 5,601, Texas 111, Ca 76, Tx 17, California 16, tx 1, plus junk like Angeles, Los Angeles, Harris County and one NY. Normalise with .str.strip().str.upper().replace({'TEXAS':'TX','CALIFORNIA':'CA'}) before grouping, or group by metro from lat/lon instead.
- segment is only commercial (13,014) or residential (1,930).
So validate against enums taken from the data (df[c].value_counts(dropna=False)), and treat only the coordinate outliers (rows outside Houston/LA) as real anomalies. In pandera, Column(float, Check.in_range(0, 1000), nullable=True) fits drone_photos.