Skip to content

Commit c938fb8

Browse files
committed
add travis config
1 parent 0fd4741 commit c938fb8

6 files changed

Lines changed: 44 additions & 53 deletions

File tree

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: node_js
2+
node_js:
3+
- node
4+
- 8
5+
- 10
6+
- 12
7+
script:
8+
- export NODE_ENV=test
9+
- npm run build
10+
- npm run test
11+
- npm run lint
12+
- nyc --silent npm run test
13+
- nyc report --reporter=text-lcov | coveralls
14+
- nyc check-coverage --lines 70
15+
after_success:
16+
-
17+
notifications:
18+
email: false
19+
sudo: false

README.md

Lines changed: 23 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
<div align="center">
3-
<img src="logo.png"><br>
3+
<img src="assets/logo.png"><br>
44
</div>
55

66
-----------------
@@ -38,6 +38,7 @@ easy and intuitive. It is heavily inspired by [Pandas](https://pandas.pydata.org
3838
sets
3939
- Robust IO tools for loading data from [flat-files](https://jsdata.gitbook.io/danfojs/api-reference/input-output)
4040
(CSV and delimited) and JSON data format.
41+
- Powerful, flexible and intutive API for [plotting](https://app.gitbook.com/@jsdata/s/danfojs/~/drafts/-MESZnq3_VBU0EW71MxS/api-reference/plotting) DataFrames and Series interactively.
4142
- [Timeseries](https://jsdata.gitbook.io/danfojs/api-reference/series#accessors)-specific functionality: date range
4243
generation and date and time properties.
4344

@@ -114,7 +115,7 @@ dfd.read_csv("https://web.stanford.edu/class/archive/cs/cs109/cs109.1166/stuff/t
114115
To use danfo.js via script tags, copy and paste the CDN below to your HTML file
115116

116117
```html
117-
<script src="https://cdn.jsdelivr.net/npm/danfojs@0.0.13/dist/index.min.js"></script>
118+
<script src="https://cdn.jsdelivr.net/npm/danfojs@0.0.14/dist/index.min.js"></script>
118119
```
119120

120121
### Example Usage in the Browser
@@ -126,83 +127,54 @@ To use danfo.js via script tags, copy and paste the CDN below to your HTML file
126127
<head>
127128
<meta charset="UTF-8">
128129
<meta name="viewport" content="width=device-width, initial-scale=1.0">
129-
<script src="https://cdn.jsdelivr.net/npm/danfojs@0.0.13/dist/index.min.js"></script>
130+
<script src="https://cdn.jsdelivr.net/npm/danfojs@0.0.14/dist/index.min.js"></script>
130131
<title>Document</title>
131132
</head>
132133

133134
<body>
134135

135-
<div id="some_div"></div>
136-
<div id="alldiv"></div>
136+
<div id="div1"></div>
137+
<div id="div2"></div>
138+
<div id="div3"></div>
139+
137140
<script>
138141
139-
dfd.read_csv("https://raw.githubusercontent.com/risenW/medium_tutorial_notebooks/master/train.csv")
142+
dfd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv")
140143
.then(df => {
141-
df.describe().print()
142-
143-
//prints in console
144-
// Shape: (5,5)
145-
146-
// ╔════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╗
147-
// ║ │ Product_Weight │ Product_Shelf... │ Product_Price │ Product_Super... │ Supermarket_O... ║
148-
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
149-
// ║ count │ 4188 │ 4990 │ 4990 │ 4990 │ 4990 ║
150-
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
151-
// ║ mean │ 12.908838 │ 0.066916 │ 391.803772 │ 6103.52002 │ 2004.783447 ║
152-
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
153-
// ║ std │ NaN │ 0.053058 │ 119.378259 │ 4447.333835 │ 8.283151 ║
154-
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
155-
// ║ min │ 4.555 │ 0 │ 78.730003 │ 83.230003 │ 1992 ║
156-
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
157-
// ║ median │ NaN │ 0.053564 │ 393.86 │ 5374.675 │ 2006 ║
158-
// ╚════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╝
159-
160-
var layout = {
161-
title: 'A sample plot',
162-
xaxis: {
163-
title: 'X',
164-
},
165-
yaxis: {
166-
title: 'Y',
167-
}
168-
};
169-
170-
//Displays plot in the specified div
171-
df['Product_Weight'].plot("some_div", { kind: "histogram" })
172-
df.plot("alldiv", { x: "Product_Price", y: "Product_Shelf_Visibility", kind: "scatter", mode: 'markers' })
173144
145+
df['AAPL.Open'].plot("div1").box() //makes a box plot
146+
147+
df.plot("div2").table() //display csv as table
148+
149+
new_df = df.set_index({ key: "Date" }) //resets the index to Date column
150+
new_df.plot("div3").line({ columns: ["AAPL.Open", "AAPL.High"] }) //makes a timeseries plot
174151
175152
}).catch(err => {
176153
console.log(err);
177154
})
155+
178156
</script>
157+
179158
</body>
180159

181160
</html>
182161
```
183162

184-
## Installation from sources
185-
To install danfo in [development mode], clone the repo:
163+
Output:
164+
![](danfo-sample.gif)
186165

187-
```sh
188-
git clone https://github.com/opensource9ja/danfojs
189-
```
190-
191-
cd into danfojs folder and run:
192-
193-
```sh
194-
npm install
195-
```
196166

197167
## Documentation
198168
The official documentation can be found [here](https://jsdata.gitbook.io/danfojs/)
199169

200170
## Discussion and Development
201-
Most development discussions take place on github in this repo. Feel free to use the issues tab.
171+
Most development discussions take place on our [issues](https://github.com/opensource9ja/danfojs/issues) tab.
202172

203173
## Contributing to Danfo
204-
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](https://jsdata.gitbook.io/danfojs/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](https://github.com/pandas-dev/pandas/blob/master/.github/CODE_OF_CONDUCT.md) Javascript version of Pandas
174+
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](https://jsdata.gitbook.io/danfojs/contributing-guide).
205175

206176
#### Licence [MIT](https://github.com/opensource9ja/danfojs/blob/master/LICENCE)
207177

178+
#### Created by [Rising Odegua](https://github.com/risenW) and [Stephen Oni](https://github.com/steveoni)
179+
208180
#### Logo Design By [Seyi Oniyitan](https://twitter.com/seyioniyitan)

assets/logo-gif.gif

117 KB
Loading

assets/logo.png

225 KB
Loading

danfojs/src/core/frame.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,12 +773,12 @@ export class DataFrame extends Ndframe {
773773
*/
774774
describe() {
775775
let numeric_df = this.select_dtypes(['float32', 'int32'])
776-
let col_names = numeric_df.columns
776+
let col_names = numeric_df.column_names
777777
let index = ['count', 'mean', 'std', 'min', 'median', 'max', 'variance']
778778

779779
let stats_arr = []
780780
col_names.forEach(name => {
781-
let col_series = numeric_df.column(name)
781+
let col_series = numeric_df[name]
782782
let count = col_series.count()
783783
let mean = col_series.mean()
784784
let std = col_series.std()

logo.png

-14.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)