Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.
danfo.js is a javascript package that provides fast, flexible, and expressive data structures designed to make working with "relational" or "labeled" data both easy and intuitive. It is heavily inspired by Pandas library, and provides a similar API. This means that users familiar with Pandas, can easily pick up danfo.js.
NaN
) in floating point as well as non-floating point dataSeries
, DataFrame
, etc. automatically
align the data for you in computationsTo use danfo.js via script tags, copy and paste the CDN below to your HTML file
<script src="https://cdn.jsdelivr.net/npm/danfojs@0.0.13/dist/index.min.js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/danfojs@0.0.13/dist/index.min.js"></script>
<title>Document</title>
</head>
<body>
<div id="some_div"></div>
<div id="alldiv"></div>
<script>
dfd.read_csv("https://raw.githubusercontent.com/risenW/medium_tutorial_notebooks/master/train.csv")
.then(df => {
df.describe().print()
//prints in console
// Shape: (5,5)
// ╔════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╗
// ║ │ Product_Weight │ Product_Shelf... │ Product_Price │ Product_Super... │ Supermarket_O... ║
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
// ║ count │ 4188 │ 4990 │ 4990 │ 4990 │ 4990 ║
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
// ║ mean │ 12.908838 │ 0.066916 │ 391.803772 │ 6103.52002 │ 2004.783447 ║
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
// ║ std │ NaN │ 0.053058 │ 119.378259 │ 4447.333835 │ 8.283151 ║
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
// ║ min │ 4.555 │ 0 │ 78.730003 │ 83.230003 │ 1992 ║
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
// ║ median │ NaN │ 0.053564 │ 393.86 │ 5374.675 │ 2006 ║
// ╚════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╝
var layout = {
title: 'A sample plot',
xaxis: {
title: 'X',
},
yaxis: {
title: 'Y',
}
};
//Displays plot in the specified div
df['Product_Weight'].plot("some_div", { kind: "histogram" })
df.plot("alldiv", { x: "Product_Price", y: "Product_Shelf_Visibility", kind: "scatter", mode: 'markers' })
}).catch(err => {
console.log(err);
})
</script>
</body>
</html>
To install danfo in [development mode], clone the repo:
git clone https://github.com/opensource9ja/danfojs
cd into danfojs folder and run:
npm install
The official documentation can be found here
Most development discussions take place on github in this repo. Feel free to use the issues tab.
All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. A detailed overview on how to contribute can be found in the contributing guide. As contributors and maintainers to this project, you are expected to abide by danfo' code of conduct. More information can be found at: Contributor Code of Conduct Javascript version of Pandas
FAQs
JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.
The npm package danfojs receives a total of 1,810 weekly downloads. As such, danfojs popularity was classified as popular.
We found that danfojs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.