-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(python): Add Schema
class
#16873
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
enhancement
New feature or an improvement of an existing feature
python
Related to Python Polars
labels
Jun 11, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16873 +/- ##
==========================================
- Coverage 81.41% 81.40% -0.01%
==========================================
Files 1425 1426 +1
Lines 187964 187980 +16
Branches 2704 2704
==========================================
+ Hits 153022 153024 +2
- Misses 34445 34459 +14
Partials 497 497 ☔ View full report in Codecov by Sentry. |
stinodego
requested review from
ritchie46,
c-peters,
alexander-beedie,
MarcoGorelli and
reswqa
as code owners
June 11, 2024 22:55
alexander-beedie
approved these changes
Jun 12, 2024
ritchie46
approved these changes
Jun 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
accepted
Ready for implementation
enhancement
New feature or an improvement of an existing feature
python
Related to Python Polars
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ref #16328
Changes
Schema
class. It is currently basically just anOrderedDict
, but has some additional methods:names
dtypes
len
schema
methods to return this new Schema class instead of anOrderedDict
.Because it inherits
OrderedDict
, it can also be used as input forschema
arguments anywhere in the API, e.g. theDataFrame
constructor,read_csv
, etc.I will expand the Schema class in the future to be a bit more user friendly for direct use. For now it's already useful as a returned object from the upcoming
LazyFrame.collect_schema
method.