3 ms·
Hmmm touché
by gigatexal 4y ago
Hmmm touché
- brahbrah 4y agoFwiw I actually do prefer polars for standard long format relational operations. But sometimes it’s just more convenient to work with data in other ways. Another example: Polars: polars_df.with_column( pl.when(pl.col('timestamp').is_between( datetime('2023-03-01'), datetime('2023-03-31'), include_bounds=True )).then(pl.col('val') * 1.1) .otherwise(pl.col('val')) .alias('val') ) Pandas: pandas_df.loc['2023-03'] *= 1.1