-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Upgrading to rs-0.46 #309
Open
Bidek56
wants to merge
10
commits into
pola-rs:main
Choose a base branch
from
Bidek56:rs-0.46
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Upgrading to rs-0.46 #309
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
36e1952
rs-0.46 WIP
c2833f0
Adding join options
090dc6a
Adding missing crates
f0684bf
Upgrading napi, Skipping 2 tests for now.
989be44
Upgrading yarn
4a9274e
Adding fn to_json
Bidek56 6292629
Upgrading Yarn and TS
Bidek56 dda1038
Fixing docs
0eab17c
Fixing docs
Bidek56 aa97d37
Fixing linting issue
Bidek56 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
511 changes: 256 additions & 255 deletions
511
.yarn/releases/yarn-4.5.3.cjs → .yarn/releases/yarn-4.7.0.cjs
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,13 +121,14 @@ Install the latest polars version with: | |
```sh | ||
$ yarn add nodejs-polars # yarn | ||
$ npm i -s nodejs-polars # npm | ||
$ bun i -D nodejs-polars # Bun | ||
``` | ||
|
||
Releases happen quite often (weekly / every few days) at the moment, so updating polars regularly to get the latest bugfixes / features might not be a bad idea. | ||
|
||
### Minimum Requirements | ||
- Node version `>=18` | ||
- Rust version `>=1.59` - *Only needed for development* | ||
- Rust version `>=1.86` - *Only needed for development* | ||
|
||
|
||
## Deno | ||
|
@@ -142,7 +143,7 @@ With Deno 1.37, you can use the `display` function to display a `DataFrame` in t | |
|
||
```typescript | ||
import pl from "npm:nodejs-polars"; | ||
import { display } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
import { display } from "https://deno.land/x/[email protected].2/mod.ts"; | ||
|
||
let response = await fetch( | ||
"https://cdn.jsdelivr.net/npm/world-atlas@1/world/110m.tsv", | ||
|
@@ -171,24 +172,22 @@ ___ | |
|
||
## Documentation | ||
|
||
Want to know about all the features Polars supports? Read the docs! | ||
Want to know about all the features Polars supports? Read the [docs](https://docs.pola.rs)! | ||
|
||
#### Python | ||
|
||
- Installation guide: `$ pip3 install polars` | ||
- [Python documentation](https://pola-rs.github.io/polars/py-polars/html/reference/index.html) | ||
- [User guide](https://pola-rs.github.io/polars-book/) | ||
- [User guide](https://docs.pola.rs) | ||
|
||
#### Rust | ||
|
||
- [Rust documentation (master branch)](https://pola-rs.github.io/polars/polars/index.html) | ||
- [User guide](https://pola-rs.github.io/polars-book/) | ||
- [Rust documentation](https://docs.rs/polars/latest/polars/) | ||
|
||
#### Node | ||
|
||
* Installation guide: `$ yarn install nodejs-polars` | ||
* [Node documentation](https://pola-rs.github.io/nodejs-polars/) | ||
* [User guide](https://pola-rs.github.io/polars-book/) | ||
|
||
## Contribution | ||
|
||
|
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we don't support serialization anymore, I'd rather remove this method, along with the other serialization based ones
toObject
,There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do support serialization using Ipc format.
Since this is JS, I figured we need Json support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at a minimum, The
toJSON
/JSON.stringify
should use a columnar representation, not the row oriented. It also needs to work withJSON.stringify
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toJSON
andJSON.stringify(df)
produce valid JSON:"[{\"foo\":1.0,\"bar\":\"a\"},{\"foo\":2.0,\"bar\":\"b\"},{\"foo\":3.0,\"bar\":\"c\"}]"
which matchesdf.writeJSON(..)
What would a valid JSON column representation look like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can share part of my unit tests that has been using the serialize to json. This is part of a REST API where there are results sent to the client using a vector of DataFrames.
Partial output from 0.43.1. DF is 2 columns, tenor:value. Tenor is range(0..=30) as f64, and value is f64 with values ranging between 2.0 and 4.0.
"{curve_values\":[{\"columns\":[{\"datatype\":\"Float64\",\"name\":\"tenor\",\"values\":[1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0,28.0,29.0,30.0]},{\"datatype\":\"Float64\",\"name\":\"value\",\"values\":[2.494,2.486,2.479,2.472,2.466,2.467,2.473,2.486,2.518,2.569,2.634,2.714,2.802,2.885,2.957,3.014,3.06,3.094,3.12,3.142,3.166,3.192,3.22,3.247,3.272,3.296,3.321,3.346,3.372,3.397]}]},{\"columns\":[{\"datatype\":\"Float64\",\"name\":\"tenor\",\"values\":[1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0,28.0,29.0,30.0]},{\"datatype\":\"Float64\",\"name\":\"value\",\"values\":[2.585,2.571,2.56,2.55,2.54,2.54,2.546,2.566,2.604,2.65,2.705,2.774,2.852,2.924,2.986,3.038,3.083,3.121,3.152,3.179,3.205,3.231,3.255,3.278,3.301,3.321,3.337,3.352,3.368,3.383]}]}",
The parenthesis/brackets are off because this is just the tail end of the message.
Same code, only changing from 0.43.1 to 0.46.
Changing the output to try to get the actual string out.
Quick bit of code to output a single dataframe of similar type.
And it's output:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A workaround we've done for this one part of our codebase is to isolate the part that reads dataframes and sends to our customer from the other parts of the system, and then keep it on 0.43.1 allowing the rest of the system to advance to 0.46. While writing a macro to generate the old output is straight forward, all the unit tests require that the returned output be able to be deserialized to it's original format.