Skip to content

Commit 21afb49

Browse files
risenWgitbook-bot
authored andcommitted
GitBook: [master] 18 pages modified
1 parent 71383e1 commit 21afb49

9 files changed

+181
-2
lines changed
+20
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
1+
---
2+
description: 'Return Addition of series and other, element-wise (binary operator add).'
3+
---
4+
15
# danfo.Series.add
26

7+
Return Addition of series and other, element-wise \(binary operator add\).
8+
9+
**parameter:** {other} Series or Number to add
10+
11+
**return:** Series
12+
13+
**Example**
14+
15+
```javascript
16+
let data = [1, 2, 3, 4, 5, 6]
17+
let data2 = [30, 40, 39, 1, 2, 1]
18+
let sf = new Series(data)
19+
let sf2 = new Series(data2)
20+
sf.add(sf2)
21+
```
22+
+22
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
1+
---
2+
description: Return the sum of the values in a series.
3+
---
4+
15
# danfo.Series.count
26

7+
Return number of non-NA/null observations in the Series.
8+
9+
This is equivalent to the method numpy.sum
10+
11+
**parameter:**
12+
13+
**return:** {Number}, sum of values in Series
14+
15+
**Example**
16+
17+
```javascript
18+
let data = ["boy", "gitl", "woman", NaN]
19+
let sf = new Series(data)
20+
sf.count()
21+
```
22+
23+
24+
+24
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
1+
---
2+
description: >-
3+
Return Floating division of series and other, element-wise (binary operator
4+
truediv).
5+
---
6+
17
# danfo.Series.div
28

9+
Return division of series and other, element-wise \(binary operator div\).
10+
11+
Equivalent to series / other
12+
13+
**parameter:** {other} Series, Number to divide with.
14+
15+
**return:** Series
16+
17+
**Example**
18+
19+
```javascript
20+
let data1 = [30, 40, 3, 5]
21+
let data2 = [1, 2, 3, 4]
22+
let sf1 = new Series(data1)
23+
let sf2 = new Series(data2)
24+
sf1.div(sf2)
25+
```
26+
+22
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
1+
---
2+
description: 'Return Modulo of series and other, element-wise (binary operator mod).'
3+
---
4+
15
# danfo.Series.mod
26

7+
Return Modulo of series and other, element-wise \(binary operator mod\).
8+
9+
Equivalent to series % other
10+
11+
**parameter:** {other} Series, Number
12+
13+
**return:** Series
14+
15+
**Example**
16+
17+
```javascript
18+
let data1 = [2, 30, 4, 5]
19+
let data2 = [1.1, 2.2, 3.3, 2.4]
20+
let sf1 = new Series(data1)
21+
let sf2 = new Series(data2)
22+
sf1.mod(sf2)
23+
```
24+
+24
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
1+
---
2+
description: 'Return Multiplication of series and other, element-wise (binary operator mul).'
3+
---
4+
15
# danfo.Series.mul
26

7+
Return Multiplication of series and other, element-wise \(binary operator mul\).
8+
9+
Equivalent to series \* other, but with support to substitute a fill\_value for missing data in one of the inputs.
10+
11+
**parameter:** {Series, Number to multiply with.
12+
13+
**return:** Series
14+
15+
**Example**
16+
17+
```javascript
18+
let data1 = [30, 40, 3, 5]
19+
let data2 = [1, 2, 3, 4]
20+
let sf1 = new Series(data1)
21+
let sf2 = new Series(data2)
22+
sf1.mul(sf2)
23+
```
24+
25+
26+
+24
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
1+
---
2+
description: >-
3+
Return Exponential power of series and other, element-wise (binary operator
4+
pow).
5+
---
6+
17
# danfo.Series.pow
28

9+
Return Exponential power of series and other, element-wise \(binary operator pow\).
10+
11+
Equivalent to series \*\* other
12+
13+
**parameter:** {other} Series, Number to multiply with.
14+
15+
**return:** Series
16+
17+
**Example**
18+
19+
```javascript
20+
let data1 = [2, 3, 4, 5]
21+
let data2 = [1, 2, 3, 0]
22+
let sf1 = new Series(data1)
23+
let sf2 = new Series(data2)
24+
sf1.pow(sf2)
25+
```
26+

api-reference/series/danfo.series.sample.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Gets \[num\] number of random rows in a Series
1313
**Example**
1414

1515
```javascript
16-
let config = { columns: this.column_names }
17-
return new Series(this.values, config)
16+
let data = [1, 2, 3, 4, 5, 620, 30, 40, 39, 89, 78]
17+
let sf = new Series(data)
18+
sf.sample(2)
1819
```
1920

2021

+22
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
1+
---
2+
description: 'Return Subtraction of series and other, element-wise (binary operator sub).'
3+
---
4+
15
# danfo.Series.sub
26

7+
Returns the subtraction between a series and other, element-wise \(binary operator subtraction\).
8+
9+
Equivalent to series - other
10+
11+
**parameter:** {other} Series, Number to subtract
12+
13+
**return:** Series
14+
15+
**Example**
16+
17+
```javascript
18+
let data1 = [30, 40, 39, 1, 2, 1]
19+
let data2 = [1, 2, 3, 4, 5, 6]
20+
let sf1 = new Series(data1)
21+
let sf2 = new Series(data2)
22+
sf1.sub(sf2)
23+
```
24+
+20
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
1+
---
2+
description: Return the sum of the values in a series.
3+
---
4+
15
# danfo.Series.sum
26

7+
Return the sum of the values for the requested axis.
8+
9+
This is equivalent to the method numpy.sum.
10+
11+
**parameter:**
12+
13+
**return:** Series
14+
15+
**Example**
16+
17+
```javascript
18+
let data1 = [30, 40, 3, 5]
19+
let sf = new Series(data1)
20+
sf.sum()
21+
```
22+

0 commit comments

Comments
 (0)