-
-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
105 additions
and
115 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,60 @@ easy and intuitive. It is heavily inspired by [Pandas](https://pandas.pydata.org | |
- Robust data preprocessing functions like [OneHotEncoders](https://jsdata.gitbook.io/danfojs/api-reference/general-functions/danfo.onehotencoder), [LabelEncoders](https://jsdata.gitbook.io/danfojs/api-reference/general-functions/danfo.labelencoder), and scalers like [StandardSaler](https://jsdata.gitbook.io/danfojs/api-reference/general-functions/danfo.standardscaler) and [MinMaxScaler](https://jsdata.gitbook.io/danfojs/api-reference/general-functions/danfo.minmaxscaler) are supported on DataFrame and Series | ||
|
||
|
||
|
||
To use danfo.js via script tags, copy and paste the CDN below to your HTML file | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js"></script> | ||
``` | ||
|
||
### Example Usage in the Browser | ||
|
||
```html | ||
|
||
<!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/[email protected]/dist/index.min.js"></script> | ||
<title>Document</title> | ||
</head> | ||
|
||
<body> | ||
|
||
<div id="div1"></div> | ||
<div id="div2"></div> | ||
<div id="div3"></div> | ||
|
||
<script> | ||
dfd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv") | ||
.then(df => { | ||
df['AAPL.Open'].plot("div1").box() //makes a box plot | ||
df.plot("div2").table() //display csv as table | ||
new_df = df.set_index({ key: "Date" }) //resets the index to Date column | ||
new_df.plot("div3").line({ columns: ["AAPL.Open", "AAPL.High"] }) //makes a timeseries plot | ||
}).catch(err => { | ||
console.log(err); | ||
}) | ||
</script> | ||
|
||
</body> | ||
|
||
</html> | ||
``` | ||
|
||
Output in Browser: | ||
|
||
![](assets/browser-out.gif) | ||
|
||
|
||
## How to install | ||
danfo.js is hosted on NPM, and can installed via package managers like npm and yarn | ||
|
||
|
@@ -120,59 +174,6 @@ Output in Node Console: | |
![](assets/node-rec.gif) | ||
|
||
|
||
To use danfo.js via script tags, copy and paste the CDN below to your HTML file | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js"></script> | ||
``` | ||
|
||
### Example Usage in the Browser | ||
|
||
```html | ||
|
||
<!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/[email protected]/dist/index.min.js"></script> | ||
<title>Document</title> | ||
</head> | ||
|
||
<body> | ||
|
||
<div id="div1"></div> | ||
<div id="div2"></div> | ||
<div id="div3"></div> | ||
|
||
<script> | ||
dfd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv") | ||
.then(df => { | ||
df['AAPL.Open'].plot("div1").box() //makes a box plot | ||
df.plot("div2").table() //display csv as table | ||
new_df = df.set_index({ key: "Date" }) //resets the index to Date column | ||
new_df.plot("div3").line({ columns: ["AAPL.Open", "AAPL.High"] }) //makes a timeseries plot | ||
}).catch(err => { | ||
console.log(err); | ||
}) | ||
</script> | ||
|
||
</body> | ||
|
||
</html> | ||
``` | ||
|
||
Output in Browser: | ||
|
||
![](assets/browser-out.gif) | ||
|
||
|
||
#### [See the Official Getting Started Guide](https://jsdata.gitbook.io/danfojs/getting-started) | ||
|
||
## Documentation | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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