Comments (4)
Thank you for the explanation. I think that explanation makes sense.
from polars.
There is only one key. The key may be a tuple (i.e. a collection of columns), but a collection is still a singular item.
from polars.
There is only one key.
However, elsewhere it is written in the plurals as keys
.
polars/py-polars/polars/dataframe/frame.py
Lines 7683 to 7686 in 25d0a2f
from polars.
This is a difference in usage. Imagine that the "key" to entering a secret club is a passcode, and each week that passcode changes. There is one key--the passcode--but the collection of passcodes form multiple key values, which one might refer to as "the keys."
In other words, there are two usages of the word "key" here: one is the key definition, the other is the key values. For the partition_by
parameter, it makes sense to say "include the key associated with each element," because each element has only one key. It would also make sense to say "include the keys associated with the various values".
The second usage (the key values) would require us to determine how many unique keys there are. For example, the following dictionaries both have one key value
{
"key1": "a",
}
{
("key1a", "key1b"): "a",
}
whereas the following has multiple keys:
{
"key1": "a",
"key2": "b",
}
Would you expect in the second case to use include_keys
but include_key
in the first case? It's more consistent and universally applicable to use the singular.
from polars.
Related Issues (20)
- `search_sorted` does not handle series sorted with `nulls_last=True` HOT 1
- Default to Arrow String type instead of LargeString HOT 4
- Streaming sort silently ignores `nulls_last=True`
- Streaming version of polars.LazyFrame.count produces a wrong result when used in aggregation
- Support for the default datetime fmt when using .cast(pl.Datetime)
- Unsorted min/max on all-NaN array returns inf/-inf HOT 1
- pl.read_database() error suggests increasing `infer_schema_length` - but no such option exists HOT 2
- dtype is upcasted silently in `list.concat`
- Inappropriate result of expr `skew` and `kurtosis` for a magic constant inputs HOT 1
- when/then/otherwise for arrays does not work
- Selecting null values from an object column makes the process unresponsive HOT 1
- `concat` failure in `0.20.16rc` HOT 2
- pl.StringCache() is not re-entrant HOT 5
- Inconsistent behavior of `pl.element().replace()`: Works for list of integers, crashes for list of strings HOT 5
- pl.Expr.get(pl.Expr.arg_min()) does not respect rolling window HOT 2
- map_dict(..., default=pl.first()) keeps the wrong column HOT 3
- Pathological slowdown in `LazyFrame.group_by_dynamic` with simple input HOT 11
- No deprecation warning, while calling a function of an imported module HOT 3
- Object Series with string elements converts to pyarrow FixedSizeBinaryArray, not LargeStringArray
- Outer join duplicates join cols HOT 1
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.