Comments (2)
This also appears to be an issue for group_by_dynamic
when defining different every
and period
.
dates = pl.date_range(
pl.datetime(2023, 1, 1),
pl.datetime(2024, 1, 1),
eager=True,
)
df = pl.DataFrame({
'date': dates,
}).with_columns(
num=pl.int_range(pl.len())
)
assert isinstance(df, pl.DataFrame)
grouped = df.group_by_dynamic(
'date',
every='1mo',
period='2mo',
)
report = grouped.agg(
pl.col('num').first().alias('num_first'),
pl.col('num').get(
pl.col('num').arg_min(),
).alias('num_get'),
)
In this example num_first
and num_get
should be the same but they are not. Removing period
correctly shows them being the same.
from polars.
Possible that internally it is the same bug as:
I thought group_by_dyamic
behaved better but now seeing that offset
will return incorrect results like rolling
, it feels similar.
from polars.
Related Issues (20)
- schema_overrides failing HOT 4
- .over() performs quite slow in given sample HOT 4
- `.backward_fill()` does not consider `np.nan` to be invalid HOT 2
- from_arrow.consuming large memory HOT 2
- Inconsistent behavior with dataframe level arithmetic when using Python's `sum` HOT 1
- `read_csv` ignores `skip_rows_after_header` when `use_pyarrow=True` HOT 1
- group_by sum agg returns nulls for decimal columns in dataframes with 1000+ rows HOT 2
- Join on struct fails with "not implemented", but on struct + other column fails silently HOT 1
- Add `mode` argument in `pl.DataFrame.write_csv` HOT 1
- Wrong document in arguments `group_by` of `DataFrame.upsample` HOT 5
- Incorrect result from projection_pushdown HOT 6
- np.NaT should get converted to null when converting from NumPy HOT 2
- Panic when building a Series of lists without an inner dtype
- Why two struct series with different type are equal?
- Upsample fills time_column but not groups
- Setup CodSpeed for PR benchmarks HOT 1
- polars' maximum length reached. Consider installing 'polars-u64-idx' with a dataframe of 12K rows HOT 3
- join_asof should allow for strict inequalities on the "on" column
- Inconsistent result from comm_subplan_elim HOT 2
- Polars write_database Connection Issue with Redshift: Unrecognized Configuration Parameter HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polars.