{ "cells": [ { "cell_type": "markdown", "id": "0ee3c25c", "metadata": {}, "source": [ "# NYC yellow-taxi trips in H5Col\n", "\n", "This example loads a sample of the [NYC Taxi & Limousine Commission](https://www.nyc.gov/site/tlc/about/tlc-trip-record-data.page)\n", "(TLC) yellow-taxi trip records into two H5Col tables and exercises most of the\n", "convention at once:\n", "\n", "- **categoricals** — numeric (`VendorID`, `RatecodeID`) and string\n", " (`payment_type`, `store_and_fwd_flag`) dictionary-encoded columns;\n", "- **missing values** — the out-of-range *sentinel* style (`passenger_count`,\n", " fill `-1`) and the *NaN* style (nullable money columns);\n", "- **datetime** — HDF5 has no datetime type, so timestamps are stored as `int64`\n", " seconds with a CF-style `units` string;\n", "- **filters** — Shuffle + Deflate on the numeric columns;\n", "- **search indexes + the query layer** — `BITMAP`, `SORTED_ROWS`, and\n", " `CHUNK_MINMAX` indexes drive `Table.select(...)`.\n", "\n", "The committed sample (`taxi/data/yellow_sample.parquet`, ~25k rows) lets this\n", "notebook run offline. For a real-scale run, download a full month first — see\n", "the last section.\n", "\n", "> Run this notebook from the `examples/` directory." ] }, { "cell_type": "code", "execution_count": 1, "id": "b3b7bee1", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:35.797032Z", "iopub.status.busy": "2026-07-13T20:20:35.796863Z", "iopub.status.idle": "2026-07-13T20:20:36.590616Z", "shell.execute_reply": "2026-07-13T20:20:36.590220Z" } }, "outputs": [], "source": [ "import h5py\n", "import numpy as np\n", "import pandas as pd\n", "\n", "# The local `taxi` package (examples/taxi) resolves when this notebook is run\n", "# from the examples/ directory.\n", "from taxi.build import DEFAULT_OUT, build\n", "from taxi.schema import decode_datetime\n", "\n", "from h5col import Table, field" ] }, { "cell_type": "markdown", "id": "b1bc5e87", "metadata": {}, "source": [ "## Build the H5Col file\n", "\n", "`build()` reads the committed parquet sample, writes the `trips` and `zones`\n", "tables into one HDF5 file, and builds three search indexes." ] }, { "cell_type": "code", "execution_count": 2, "id": "dc272194", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.592132Z", "iopub.status.busy": "2026-07-13T20:20:36.591997Z", "iopub.status.idle": "2026-07-13T20:20:36.757983Z", "shell.execute_reply": "2026-07-13T20:20:36.757541Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "wrote /Users/ajelenak/Documents/H5Col/h5col/examples/taxi/nyc_taxi.h5 (1.40 MB), 25000 trips\n" ] }, { "data": { "text/plain": [ "" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "path = build() # writes taxi/nyc_taxi.h5\n", "f = h5py.File(DEFAULT_OUT, \"r\")\n", "trips = Table(f[\"trips\"])\n", "zones = Table(f[\"zones\"])\n", "trips" ] }, { "cell_type": "code", "execution_count": 3, "id": "0c85774c", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.759286Z", "iopub.status.busy": "2026-07-13T20:20:36.759197Z", "iopub.status.idle": "2026-07-13T20:20:36.761202Z", "shell.execute_reply": "2026-07-13T20:20:36.760831Z" } }, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "zones" ] }, { "cell_type": "code", "execution_count": 4, "id": "cadabcfa", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.762086Z", "iopub.status.busy": "2026-07-13T20:20:36.762015Z", "iopub.status.idle": "2026-07-13T20:20:36.764956Z", "shell.execute_reply": "2026-07-13T20:20:36.764598Z" } }, "outputs": [ { "data": { "text/plain": [ "['VendorID',\n", " 'tpep_pickup_datetime',\n", " 'tpep_dropoff_datetime',\n", " 'passenger_count',\n", " 'trip_distance',\n", " 'RatecodeID',\n", " 'store_and_fwd_flag',\n", " 'PULocationID',\n", " 'DOLocationID',\n", " 'payment_type',\n", " 'fare_amount',\n", " 'extra',\n", " 'mta_tax',\n", " 'tip_amount',\n", " 'tolls_amount',\n", " 'improvement_surcharge',\n", " 'total_amount',\n", " 'congestion_surcharge',\n", " 'airport_fee']" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "list(trips.column_names)" ] }, { "cell_type": "markdown", "id": "ce840b57", "metadata": {}, "source": [ "## Categorical columns\n", "\n", "`payment_type` is stored as a **string** categorical: the file holds small\n", "integer codes plus a categories dataset, and `Column.read()` returns the labels." ] }, { "cell_type": "code", "execution_count": 5, "id": "07b9df86", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.765827Z", "iopub.status.busy": "2026-07-13T20:20:36.765770Z", "iopub.status.idle": "2026-07-13T20:20:36.775435Z", "shell.execute_reply": "2026-07-13T20:20:36.774990Z" } }, "outputs": [ { "data": { "text/plain": [ "Credit card 19190\n", "Cash 3981\n", "Not specified 1000\n", "Dispute 637\n", "No charge 192\n", "Name: count, dtype: int64" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pt = trips[\"payment_type\"].read()\n", "pd.Series(pt).value_counts()" ] }, { "cell_type": "code", "execution_count": 6, "id": "04bc76e0", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.776396Z", "iopub.status.busy": "2026-07-13T20:20:36.776331Z", "iopub.status.idle": "2026-07-13T20:20:36.779192Z", "shell.execute_reply": "2026-07-13T20:20:36.778896Z" } }, "outputs": [ { "data": { "text/plain": [ "array(['Not specified', 'Credit card', 'Cash', 'No charge', 'Dispute',\n", " 'Unknown', 'Voided trip'], dtype=object)" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# The distinct labels live in a categories dataset referenced by the column.\n", "trips[\"payment_type\"].categories" ] }, { "cell_type": "markdown", "id": "00dfdefa", "metadata": {}, "source": [ "## Missing values\n", "\n", "H5Col marks a missing row with the column's HDF5 fill value. This sample shows\n", "both recommended styles:\n", "\n", "- `passenger_count` — an integer column with an out-of-range **sentinel** fill\n", " (`-1`, with `valid_min = 0`);\n", "- `RatecodeID` (categorical) and the nullable money columns — **NaN / missing\n", " code** style.\n", "\n", "`Column.is_missing()` applies the canonical missing-value test." ] }, { "cell_type": "code", "execution_count": 7, "id": "34261c4f", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.780171Z", "iopub.status.busy": "2026-07-13T20:20:36.780112Z", "iopub.status.idle": "2026-07-13T20:20:36.793435Z", "shell.execute_reply": "2026-07-13T20:20:36.793041Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
missingfill_value
passenger_count1000-1.0
RatecodeID1000-1.0
store_and_fwd_flag1000-1.0
congestion_surcharge1000NaN
airport_fee1000NaN
\n", "
" ], "text/plain": [ " missing fill_value\n", "passenger_count 1000 -1.0\n", "RatecodeID 1000 -1.0\n", "store_and_fwd_flag 1000 -1.0\n", "congestion_surcharge 1000 NaN\n", "airport_fee 1000 NaN" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "nullable = [\n", " \"passenger_count\",\n", " \"RatecodeID\",\n", " \"store_and_fwd_flag\",\n", " \"congestion_surcharge\",\n", " \"airport_fee\",\n", "]\n", "pd.DataFrame(\n", " {\n", " \"missing\": {c: int(trips[c].is_missing().sum()) for c in nullable},\n", " \"fill_value\": {c: trips[c].fill_value for c in nullable},\n", " }\n", ")" ] }, { "cell_type": "markdown", "id": "0f9b2fd7", "metadata": {}, "source": [ "## Datetime\n", "\n", "The pickup/dropoff columns are `int64` seconds carrying a `units` attribute; the\n", "`taxi.schema` codec decodes them back to `datetime64`. The TLC timestamps are\n", "local NYC wall-clock (no timezone), preserved verbatim." ] }, { "cell_type": "code", "execution_count": 8, "id": "3da7b5cc", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.794374Z", "iopub.status.busy": "2026-07-13T20:20:36.794311Z", "iopub.status.idle": "2026-07-13T20:20:36.798477Z", "shell.execute_reply": "2026-07-13T20:20:36.798137Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "units: seconds since 1970-01-01 00:00:00\n", "pickup range: 2009-01-01T23:58:40 -> 2024-01-01T06:51:17\n" ] } ], "source": [ "pickup = decode_datetime(trips[\"tpep_pickup_datetime\"].read())\n", "print(\"units:\", trips[\"tpep_pickup_datetime\"].units)\n", "print(\"pickup range:\", pickup.min(), \"->\", pickup.max())" ] }, { "cell_type": "markdown", "id": "a681a791", "metadata": {}, "source": [ "## Querying with search indexes\n", "\n", "`Table.select(...)` takes a pyarrow-style expression. `Selection.explain()`\n", "reports which index answered each predicate. Three indexes are in play:\n", "\n", "| column | index | good for |\n", "|---|---|---|\n", "| `payment_type` | `BITMAP` | categorical equality / `isin` |\n", "| `total_amount` | `SORTED_ROWS` | numeric range |\n", "| `tpep_pickup_datetime` | `CHUNK_MINMAX` | range pruning by chunk |" ] }, { "cell_type": "code", "execution_count": 9, "id": "6e41c387", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.799368Z", "iopub.status.busy": "2026-07-13T20:20:36.799314Z", "iopub.status.idle": "2026-07-13T20:20:36.807831Z", "shell.execute_reply": "2026-07-13T20:20:36.807467Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "credit-card trips: 19190\n" ] }, { "data": { "text/plain": [ "QueryPlan(nrows=25000, terms=[TermPlan(leaves=[LeafPlan(column='payment_type', op='==', negated=False, method='bitmap', note='')])], matched=19190)" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "q = trips.select(field(\"payment_type\") == \"Credit card\")\n", "print(\"credit-card trips:\", q.count)\n", "q.explain()" ] }, { "cell_type": "code", "execution_count": 10, "id": "f8ab349d", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.808826Z", "iopub.status.busy": "2026-07-13T20:20:36.808753Z", "iopub.status.idle": "2026-07-13T20:20:36.815247Z", "shell.execute_reply": "2026-07-13T20:20:36.814948Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "trips over $50: 1936\n" ] }, { "data": { "text/plain": [ "QueryPlan(nrows=25000, terms=[TermPlan(leaves=[LeafPlan(column='total_amount', op='>', negated=False, method='sorted_rows', note='')])], matched=1936)" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "q = trips.select(field(\"total_amount\") > 50)\n", "print(\"trips over $50:\", q.count)\n", "q.explain()" ] }, { "cell_type": "code", "execution_count": 11, "id": "00383332", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.816172Z", "iopub.status.busy": "2026-07-13T20:20:36.816116Z", "iopub.status.idle": "2026-07-13T20:20:36.828139Z", "shell.execute_reply": "2026-07-13T20:20:36.827773Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "pickups 6-7am on Jan 1: 21\n" ] }, { "data": { "text/plain": [ "QueryPlan(nrows=25000, terms=[TermPlan(leaves=[LeafPlan(column='tpep_pickup_datetime', op='>=', negated=False, method='chunk_minmax+verify', note='1 candidate chunks'), LeafPlan(column='tpep_pickup_datetime', op='<', negated=False, method='scan', note='')])], matched=21)" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "lo = np.datetime64(\"2024-01-01T06:00:00\").astype(\"datetime64[s]\").astype(\"int64\")\n", "hi = np.datetime64(\"2024-01-01T07:00:00\").astype(\"datetime64[s]\").astype(\"int64\")\n", "pickup_at = field(\"tpep_pickup_datetime\")\n", "q = trips.select((pickup_at >= int(lo)) & (pickup_at < int(hi)))\n", "print(\"pickups 6-7am on Jan 1:\", q.count)\n", "q.explain() # chunk_minmax pruning: only a few candidate chunks are read" ] }, { "cell_type": "markdown", "id": "38e2613e", "metadata": {}, "source": [ "## Combining predicates and reading columns\n", "\n", "Boolean operators (`&`, `|`, `~`), `.isin(...)`, and `.is_valid()` / `.is_null()`\n", "compose. `Selection.read(columns=...)` materializes only the requested columns\n", "for the matching rows." ] }, { "cell_type": "code", "execution_count": 12, "id": "8f249a7d", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.829064Z", "iopub.status.busy": "2026-07-13T20:20:36.829000Z", "iopub.status.idle": "2026-07-13T20:20:36.852424Z", "shell.execute_reply": "2026-07-13T20:20:36.852103Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "matching rows: 1566\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
total_amounttip_amountpayment_type
064.9510.00Credit card
185.0914.15Credit card
2127.940.00Credit card
360.727.92Credit card
467.4911.25Credit card
\n", "
" ], "text/plain": [ " total_amount tip_amount payment_type\n", "0 64.95 10.00 Credit card\n", "1 85.09 14.15 Credit card\n", "2 127.94 0.00 Credit card\n", "3 60.72 7.92 Credit card\n", "4 67.49 11.25 Credit card" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sel = trips.select(\n", " (field(\"total_amount\") > 50)\n", " & (field(\"payment_type\") == \"Credit card\")\n", " & field(\"airport_fee\").is_valid()\n", ")\n", "print(\"matching rows:\", sel.count)\n", "result = sel.read(columns=[\"total_amount\", \"tip_amount\", \"payment_type\"])\n", "pd.DataFrame(result).head()" ] }, { "cell_type": "markdown", "id": "21e17f56", "metadata": {}, "source": [ "## Storage and compression\n", "\n", "Because the numeric columns carry a Shuffle + Deflate filter pipeline, the\n", "stored size is a fraction of the logical (uncompressed) size." ] }, { "cell_type": "code", "execution_count": 13, "id": "d8439100", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.853491Z", "iopub.status.busy": "2026-07-13T20:20:36.853424Z", "iopub.status.idle": "2026-07-13T20:20:36.871757Z", "shell.execute_reply": "2026-07-13T20:20:36.871465Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "trips: 2.90 MB logical -> 0.60 MB stored (4.9x)\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
columndtypelogical_Bstored_Bratio
4trip_distancefloat642000001260081.6
16total_amountfloat642000001202471.7
13tip_amountfloat642000001046101.9
10fare_amountfloat64200000610603.3
2tpep_dropoff_datetimeint64200000457244.4
1tpep_pickup_datetimeint64200000447024.5
8DOLocationIDint32100000240774.2
7PULocationIDint32100000216024.6
14tolls_amountfloat642000001086018.4
11extrafloat64200000917221.8
\n", "
" ], "text/plain": [ " column dtype logical_B stored_B ratio\n", "4 trip_distance float64 200000 126008 1.6\n", "16 total_amount float64 200000 120247 1.7\n", "13 tip_amount float64 200000 104610 1.9\n", "10 fare_amount float64 200000 61060 3.3\n", "2 tpep_dropoff_datetime int64 200000 45724 4.4\n", "1 tpep_pickup_datetime int64 200000 44702 4.5\n", "8 DOLocationID int32 100000 24077 4.2\n", "7 PULocationID int32 100000 21602 4.6\n", "14 tolls_amount float64 200000 10860 18.4\n", "11 extra float64 200000 9172 21.8" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "rows = []\n", "logical_total = stored_total = 0\n", "for name in trips.column_names:\n", " ds = trips[name].dataset # for categoricals this is the integer code dataset\n", " logical = int(np.prod(ds.shape)) * ds.dtype.itemsize\n", " stored = ds.id.get_storage_size()\n", " logical_total += logical\n", " stored_total += stored\n", " ratio = round(logical / max(stored, 1), 1)\n", " rows.append((name, str(ds.dtype), logical, stored, ratio))\n", "\n", "df = pd.DataFrame(rows, columns=[\"column\", \"dtype\", \"logical_B\", \"stored_B\", \"ratio\"])\n", "overall = logical_total / max(stored_total, 1)\n", "print(\n", " f\"trips: {logical_total / 1e6:.2f} MB logical -> \"\n", " f\"{stored_total / 1e6:.2f} MB stored ({overall:.1f}x)\"\n", ")\n", "df.sort_values(\"stored_B\", ascending=False).head(10)" ] }, { "cell_type": "markdown", "id": "ba250b25", "metadata": {}, "source": [ "## The zones dimension\n", "\n", "`PULocationID` / `DOLocationID` reference the `zones` table (fixed-length string\n", "columns). `h5col` does not do joins, but the lookup is a plain pandas merge." ] }, { "cell_type": "code", "execution_count": 14, "id": "b621610b", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.872845Z", "iopub.status.busy": "2026-07-13T20:20:36.872785Z", "iopub.status.idle": "2026-07-13T20:20:36.878044Z", "shell.execute_reply": "2026-07-13T20:20:36.877676Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
BoroughZoneservice_zone
LocationID
1EWRNewark AirportEWR
2QueensJamaica BayBoro Zone
3BronxAllerton/Pelham GardensBoro Zone
4ManhattanAlphabet CityYellow Zone
5Staten IslandArden HeightsBoro Zone
\n", "
" ], "text/plain": [ " Borough Zone service_zone\n", "LocationID \n", "1 EWR Newark Airport EWR\n", "2 Queens Jamaica Bay Boro Zone\n", "3 Bronx Allerton/Pelham Gardens Boro Zone\n", "4 Manhattan Alphabet City Yellow Zone\n", "5 Staten Island Arden Heights Boro Zone" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "zdf = pd.DataFrame({c: zones[c].read() for c in zones.column_names})\n", "zdf = zdf.set_index(\"LocationID\")\n", "zdf.head()" ] }, { "cell_type": "code", "execution_count": 15, "id": "0708f946", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.878920Z", "iopub.status.busy": "2026-07-13T20:20:36.878867Z", "iopub.status.idle": "2026-07-13T20:20:36.883252Z", "shell.execute_reply": "2026-07-13T20:20:36.882896Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
BoroughZone
LocationID
186ManhattanPenn Station/Madison Sq West
140ManhattanLenox Hill East
236ManhattanUpper East Side North
79ManhattanEast Village
211ManhattanSoHo
\n", "
" ], "text/plain": [ " Borough Zone\n", "LocationID \n", "186 Manhattan Penn Station/Madison Sq West\n", "140 Manhattan Lenox Hill East\n", "236 Manhattan Upper East Side North\n", "79 Manhattan East Village\n", "211 Manhattan SoHo" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Where did the first few trips start?\n", "pu = trips[\"PULocationID\"].read()[:5]\n", "zdf.loc[pu, [\"Borough\", \"Zone\"]]" ] }, { "cell_type": "markdown", "id": "d678ccf6", "metadata": {}, "source": [ "## Real scale\n", "\n", "The full monthly files (~3M rows) are not committed. Fetch one on demand and\n", "rebuild against it:\n", "\n", "```python\n", "from taxi import fetch\n", "month = fetch.yellow_tripdata(\"2024-01\") # downloads ~50 MB into taxi/cache/\n", "build(out=\"nyc_taxi_full.h5\", sample_parquet=month)\n", "```\n", "\n", "Or from a shell:\n", "\n", "```bash\n", "pixi run -e examples python -m examples.taxi.fetch 2024-01\n", "```" ] }, { "cell_type": "code", "execution_count": 16, "id": "8cf6e2cf", "metadata": { "execution": { "iopub.execute_input": "2026-07-13T20:20:36.884323Z", "iopub.status.busy": "2026-07-13T20:20:36.884263Z", "iopub.status.idle": "2026-07-13T20:20:36.885770Z", "shell.execute_reply": "2026-07-13T20:20:36.885488Z" } }, "outputs": [], "source": [ "f.close()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.14.6" } }, "nbformat": 4, "nbformat_minor": 5 }