In version 3.16, the offset_by takes roll as argument but:
[outdated exception message] when roll is omitted and offset_by("1bd")is being applied on a column containing non-business dates, an outdated error message is raised: "'roll' argument is coming soon".
[bug] when roll is used with an improper value: "internal error: entered unreachable code"
import polars as pl
import polars_business as plb
import datetime
df = pl.DataFrame({
"date": pl.date_range(datetime.date(2023,12,1), datetime.date(2023,12,5), eager=True)
})
df.with_columns(pl.col("date").bdt.offset_by("1bd")) # this will return the outdated exception message
df.with_columns(pl.col("date").bdt.offset_by("1bd", roll="forward")) # this will work as expected
df.with_columns(pl.col("date").bdt.offset_by("1bd", roll="cabbage")) # this will enter unreachable code
In version 3.16, the
offset_by
takesroll
as argument but:[outdated exception message] when
roll
is omitted andoffset_by("1bd")
is being applied on a column containing non-business dates, an outdated error message is raised: "'roll' argument is coming soon".[bug] when
roll
is used with an improper value: "internal error: entered unreachable code"