pola-rs / polars

Dataframes powered by a multithreaded, vectorized query engine, written in Rust
https://docs.pola.rs
Other
30.2k stars 1.95k forks source link

Affine columns #14200

Open marton78 opened 9 months ago

marton78 commented 9 months ago

Description

I work with time series data in Pandas, would love to move to Polars but need a way to replicate my use of pd.RangeIndex. I know that Polars doesn't have indices and support that decision, however, I would need a column with the equivalent features.

How I currently use pd.RangeIndex:

Proposed behaviour:

I think it's fairly common to have such columns in many different applications, storing them as start and step saves lots of memory and clearly documents intent.

marton78 commented 9 months ago

@ritchie46 I sponsored you for this, please have a look! Do you think this is feasible?