Skip to content

Commit

Permalink
chore: update readme and package.json (#2096)
Browse files Browse the repository at this point in the history
  • Loading branch information
universalmind303 committed Dec 20, 2021
1 parent 390ac45 commit 49e0fa3
Show file tree
Hide file tree
Showing 14 changed files with 58 additions and 37 deletions.
43 changes: 22 additions & 21 deletions nodejs-polars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,36 @@ const df = pl.DataFrame(
cars: ["beetle", "audi", "beetle", "beetle", "beetle"],
}
)
df
const df2 = df
.sort("fruits")
.select(
"fruits",
"cars",
pl.lit("fruits").alias("literal_string_fruits"),
pl.col("B").filter(pl.col("cars").eq("beetle")).sum(),
pl.col("A").filter(pl.col("B").gt(2)).sum().over("cars").alias("sum_A_by_cars")
pl.col("A").sum().over("fruits").alias("sum_A_by_fruits")
pl.col("B").filter(pl.col("cars").eq(lit("beetle"))).sum(),
pl.col("A").filter(pl.col("B").gt(2)).sum().over("cars").alias("sum_A_by_cars"),
pl.col("A").sum().over("fruits").alias("sum_A_by_fruits"),
pl.col("A").reverse().over("fruits").flatten().alias("rev_A_by_fruits")
pl.col("A").sort().over("fruits").flatten().alias("sort_A_by_B_by_fruits")
)

console.log(df2)
shape: (5, 8)
┌──────────┬──────────┬──────────────┬─────┬─────────────┬─────────────┬─────────────┬─────────────
│ fruits ┆ cars ┆ literal_stri ┆ B ┆ sum_A_by_ca ┆ sum_A_by_fr ┆ rev_A_by_fr ┆ sort_A_by_B
------ ┆ ng_fruits ┆ --- ┆ rs ┆ uits ┆ uits ┆ _by_fruits
│ str ┆ str ┆ --- ┆ i64 ┆ --------- ---
│ ┆ ┆ str ┆ ┆ i64 ┆ i64 ┆ i64 ┆ i64
╞══════════╪══════════╪══════════════╪═════╪═════════════╪═════════════╪═════════════╪═════════════
"apple""beetle""fruits"11474 4
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌
"apple""beetle""fruits"11473 3
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌
"banana""beetle""fruits"11485 5
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌
"banana""audi""fruits"11282 2
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌
"banana""beetle""fruits"11481 1
└──────────┴──────────┴──────────────┴─────┴─────────────┴─────────────┴─────────────┴─────────────
┌──────────┬──────────┬──────────────┬─────┬─────────────┬─────────────┬─────────────┐
│ fruits ┆ cars ┆ literal_stri ┆ B ┆ sum_A_by_ca ┆ sum_A_by_fr ┆ rev_A_by_fr │
------ ┆ ng_fruits ┆ --- ┆ rs ┆ uits ┆ uits │
│ str ┆ str ┆ --- ┆ i64 ┆ ---------
│ ┆ ┆ str ┆ ┆ i64 ┆ i64 ┆ i64 │
╞══════════╪══════════╪══════════════╪═════╪═════════════╪═════════════╪═════════════╡
"apple""beetle""fruits"11474
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
"apple""beetle""fruits"11473
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
"banana""beetle""fruits"11485
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
"banana""audi""fruits"11282
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
"banana""beetle""fruits"11481
└──────────┴──────────┴──────────────┴─────┴─────────────┴─────────────┴─────────────┘

```

Expand Down
2 changes: 1 addition & 1 deletion nodejs-polars/npm/android-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars-android-arm64",
"version": "0.0.2",
"version": "0.0.5",
"os": [
"android"
],
Expand Down
2 changes: 1 addition & 1 deletion nodejs-polars/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars-darwin-arm64",
"version": "0.0.2",
"version": "0.0.5",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion nodejs-polars/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars-darwin-x64",
"version": "0.0.2",
"version": "0.0.5",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion nodejs-polars/npm/freebsd-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars-freebsd-x64",
"version": "0.0.2",
"version": "0.0.5",
"os": [
"freebsd"
],
Expand Down
2 changes: 1 addition & 1 deletion nodejs-polars/npm/linux-arm-gnueabihf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars-linux-arm-gnueabihf",
"version": "0.0.2",
"version": "0.0.5",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion nodejs-polars/npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars-linux-arm64-gnu",
"version": "0.0.2",
"version": "0.0.5",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion nodejs-polars/npm/linux-arm64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars-linux-arm64-musl",
"version": "0.0.2",
"version": "0.0.5",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion nodejs-polars/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars-linux-x64-gnu",
"version": "0.0.2",
"version": "0.0.5",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion nodejs-polars/npm/linux-x64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars-linux-x64-musl",
"version": "0.0.2",
"version": "0.0.5",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion nodejs-polars/npm/win32-arm64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars-win32-arm64-msvc",
"version": "0.0.2",
"version": "0.0.5",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion nodejs-polars/npm/win32-ia32-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars-win32-ia32-msvc",
"version": "0.0.2",
"version": "0.0.5",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion nodejs-polars/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars-win32-x64-msvc",
"version": "0.0.2",
"version": "0.0.5",
"os": [
"win32"
],
Expand Down
28 changes: 24 additions & 4 deletions nodejs-polars/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
{
"name": "nodejs-polars",
"version": "0.0.4",
"repository": "https://github.com/universalmind303/polars.git",
"license": "MIT",
"version": "0.0.5",
"repository": "https://github.com/pola-rs/polars.git",
"license": "SEE LICENSE IN LICENSE",
"main": "bin/index.js",
"files": [
"bin"
],
"keywords": [
"polars",
"dataframe",
"data-processing",
"rust"
],
"napi": {
"name": "nodejs-polars",
"triples": {
Expand Down Expand Up @@ -95,5 +101,19 @@
"singleQuote": true,
"arrowParens": "always",
"parser": "typescript"
},
"optionalDependencies": {
"nodejs-polars-win32-x64-msvc": "0.0.5",
"nodejs-polars-darwin-x64": "0.0.5",
"nodejs-polars-linux-x64-gnu": "0.0.5",
"nodejs-polars-win32-ia32-msvc": "0.0.5",
"nodejs-polars-linux-arm64-gnu": "0.0.5",
"nodejs-polars-linux-arm-gnueabihf": "0.0.5",
"nodejs-polars-darwin-arm64": "0.0.5",
"nodejs-polars-android-arm64": "0.0.5",
"nodejs-polars-freebsd-x64": "0.0.5",
"nodejs-polars-linux-x64-musl": "0.0.5",
"nodejs-polars-linux-arm64-musl": "0.0.5",
"nodejs-polars-win32-arm64-msvc": "0.0.5"
}
}
}

0 comments on commit 49e0fa3

Please sign in to comment.