Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
nodejs-polars
Advanced tools
[![rust docs](https://docs.rs/polars/badge.svg)](https://docs.rs/polars/latest/polars/) [![Build and test](https://github.com/pola-rs/polars/workflows/Build%20and%20test/badge.svg)](https://github.com/pola-rs/polars/actions) [![](https://img.shields.io/cr
// esm
import pl from 'nodejs-polars';
// require
const pl = require('nodejs-polars');
>>> const fooSeries = pl.Series("foo", [1, 2, 3])
>>> fooSeries.sum()
6
// a lot operations support both positional and named arguments
// you can see the full specs in the docs or the type definitions
>>> fooSeries.sort(true)
>>> fooSeries.sort({reverse: true})
shape: (3,)
Series: 'foo' [f64]
[
3
2
1
]
>>> fooSeries.toArray()
[1, 2, 3]
// Series are 'Iterables' so you can use javascript iterable syntax on them
>>> [...fooSeries]
[1, 2, 3]
>>> fooSeries[0]
1
>>> const df = pl.DataFrame(
... {
... A: [1, 2, 3, 4, 5],
... fruits: ["banana", "banana", "apple", "apple", "banana"],
... B: [5, 4, 3, 2, 1],
... cars: ["beetle", "audi", "beetle", "beetle", "beetle"],
... }
... )
>>> df
... .sort("fruits")
... .select(
... "fruits",
... "cars",
... pl.lit("fruits").alias("literal_string_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")
... )
shape: (5, 8)
┌──────────┬──────────┬──────────────┬─────┬─────────────┬─────────────┬─────────────┐
│ 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" ┆ 11 ┆ 4 ┆ 7 ┆ 4 │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ "apple" ┆ "beetle" ┆ "fruits" ┆ 11 ┆ 4 ┆ 7 ┆ 3 │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ "banana" ┆ "beetle" ┆ "fruits" ┆ 11 ┆ 4 ┆ 8 ┆ 5 │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ "banana" ┆ "audi" ┆ "fruits" ┆ 11 ┆ 2 ┆ 8 ┆ 2 │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ "banana" ┆ "beetle" ┆ "fruits" ┆ 11 ┆ 4 ┆ 8 ┆ 1 │
└──────────┴──────────┴──────────────┴─────┴─────────────┴─────────────┴─────────────┘
>>> df["cars"] // or df.getColumn("cars")
shape: (5,)
Series: 'cars' [str]
[
"beetle"
"beetle"
"beetle"
"audi"
"beetle"
]
Install the latest polars version with:
$ yarn add nodejs-polars # yarn
$ npm i -s nodejs-polars # npm
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.
>=16
>=1.59
- Only needed for developmentWant to know about all the features Polars supports? Read the docs!
$ pip3 install polars
$ yarn install nodejs-polars
Want to contribute? Read our contribution guideline.
If you want a bleeding edge release or maximal performance you should compile polars from source.
npm|yarn install
$ cd nodejs-polars && yarn build && yarn build:ts # this will generate a /bin directory with the compiles TS code, as well as the rust binary
$ cd nodejs-polars && yarn build:debug && yarn build:ts # this will generate a /bin directory with the compiles TS code, as well as the rust binary
Development of Polars is proudly powered by
FAQs
Polars: Blazingly fast DataFrames in Rust, Python, Node.js, R and SQL
The npm package nodejs-polars receives a total of 14,806 weekly downloads. As such, nodejs-polars popularity was classified as popular.
We found that nodejs-polars demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.