File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545; ; tree-based index is pure overhead — you'd rebuild it constantly. As Chris
4646; ; Nuernberger (author of tech.ml.dataset) put it: "Just sorting the dataset and
4747; ; using binary search will outperform most/all tree structures in this scenario."
48- ; ; This is the same conclusion that [Polars](https://pola.rs/) reached. The
49- ; ; Rust-based DataFrame library — now the fastest-growing Pandas alternative —
50- ; ; has no index by design. You always specify the column explicitly:
51- ; ;
52- ; ; ```python
53- ; ; # Pandas (implicit index)
54- ; ; df = df.set_index('Time')
55- ; ; df['2024-01'] # slice via index
56- ; ; df.resample('D').mean() # resample via index
57- ; ;
58- ; ; # Polars (explicit column)
59- ; ; df.filter(pl.col('Time').dt.year() == 2024, pl.col('Time').dt.month() == 1)
60- ; ; df.group_by_dynamic('Time', every='1d').agg(pl.col('Demand').mean())
61- ; ; ```
48+ ; ; (This is the same conclusion that [Polars](https://pola.rs/), the fastest-growing
49+ ; ; Pandas alternative, reached — no index by design.)
6250; ;
6351; ; **On convenience:** The index adds implicit state threaded through your data.
6452; ; Tablecloth's API avoids this — you always say which columns you're operating on.
You can’t perform that action at this time.
0 commit comments