Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
breadroll
Advanced tools
Readme
breadroll 🥟 is a simple lightweight toolkit for parsing csv, tsv, and other delimited files, performing EDA (exploratory data analysis), and data processing operations on multivariate datasets. Think pandas but written in Typescript and developed on the Bun Runtime.
System Requirements:
breadroll is built on and optimized for Bun.js. You can install Bun by running the following
curl https://bun.sh/install | bash
create a new Bun project by running
bun init
then you can now install breadroll using
bun add breadroll
breadroll provides an easy to use API that gets you from zero to data processing in no time, with lazy loading of these delimited files via Bun's File I/O Bun.file()
, the file parsed based on the DataframeReadOptions
, and convert into a Dataframe
, and easily read out the content of the Dataframe using .value
.
import Breadroll, { Dataframe } from "breadroll";
const csv: Breadroll = new Breadroll({ header: true, delimiter: "," });
Example: From one instance example above, you can open multiple csv
files
const df: Dataframe = await csv.open.local("./data/ds_salaries.csv");
breadroll makes it easy to work with remote data sources with current support for HTTPS and Supabase Storage. With other remote data sources on the roadmap.
const df: Dataframe = await csv.open.https("https://.../.../filename.csv");
const df: Dataframe = await csv.open.supabaseStorage("bucketName", "filepath");
Peform complex filtering; with various filters including range filters like is between
that can be achieved using an optional function parameter limit
which is the upper limit. These range filter are only effective with numbers (integers, floating-point).
df.filter("age", "is between", 30, 40);
Perform even more complex filtering with multiple / chained filter, you can chain the filter ie. filtering the previously filtered Dataframe
, the chained filter can be as long as you need them to be.
df.filter("age", "is between", 30, 40)
.filter("salary", ">", 70000)
.filter("work_year", "==", 2020);
Perform whatever transformation you'd like to perform on the value of a specified column, from simple transformation like value + 2
, to complex mathematical transformations that can be paired with the in-built numeric constant object
df.apply({ key: "salary", fn: (v) => v / (40 * 4), newkey: "per_hour" });
Get a single number that accurately represents the underlying data with the many provided aggregation functions, the likes of average (mean), max, min, sum, count, etc. with more in development
df.sum("capital_gain")
df.average("capital_gain")
df.count
This project running on bun v1.0.22. Bun.js is a fast all-in-one JavaScript runtime.
FAQs
breadroll 🥟 is a simple lightweight library for data processing operations written in Typescript and powered by Bun.
The npm package breadroll receives a total of 14 weekly downloads. As such, breadroll popularity was classified as not popular.
We found that breadroll demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.