Skip to content

Commit

Permalink
GitBook: [#217] No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
risenW authored and gitbook-bot committed Jan 30, 2022
1 parent bf7505d commit aa43be1
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
* [Series.lt](api-reference/series/series.lt.md)
* [Series.iloc](api-reference/series/series.iloc.md)
* [Series.loc](api-reference/series/series.loc.md)
* [Series.at](api-reference/series/series.at.md)
* [Series.iat](api-reference/series/series.iat.md)
* [Series.ndim](api-reference/series/series.ndim.md)
* [Series.shape](api-reference/series/series.shape.md)
* [Series.dtype](api-reference/series/series.dtype.md)
Expand Down Expand Up @@ -145,6 +147,8 @@
* [DataFrame.index](api-reference/dataframe/dataframe.index.md)
* [DataFrame.loc](api-reference/dataframe/danfo.dataframe.loc.md)
* [DataFrame.iloc](api-reference/dataframe/danfo.dataframe.iloc.md)
* [DataFrame.at](api-reference/dataframe/dataframe.at.md)
* [DataFrame.iat](api-reference/dataframe/dataframe.iat.md)
* [DataFrame.head](api-reference/dataframe/danfo.dataframe.head.md)
* [DataFrame.tail](api-reference/dataframe/danfo.dataframe.tail.md)
* [DataFrame.sample](api-reference/dataframe/danfo.dataframe.sample.md)
Expand Down
36 changes: 36 additions & 0 deletions api-reference/dataframe/dataframe.at.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
description: Access a single value for a row/column label pair.
---

# DataFrame.at

> danfo.DataFrame.at(row, column)
| Parameters | Type | Description | Default |
| ---------- | -------------- | ------------------------- | ------- |
| row | Number, String | row position in the index | |
| column | String | Column position | |

**Return:** Scalar



{% tabs %}
{% tab title="Node" %}
```javascript
const dfd = require("danfojs-node")

let data = {
"Name": ["Apples", "Mango", "Banana", "Pear"],
"Count": [21, 5, 30, 10],
"Price": [200, 300, 40, 250]
}

let df = new dfd.DataFrame(data, { index: [1, "b", "c", "d"] })
df.at(1, "Count")

//output
21
```
{% endtab %}
{% endtabs %}
36 changes: 36 additions & 0 deletions api-reference/dataframe/dataframe.iat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
description: Access a single value for a row/column pair by integer position.
---

# DataFrame.iat

> danfo.DataFrame.iat(row, column)
| Parameters | Type | Description | Default |
| ---------- | ------ | --------------------- | ------- |
| row | Number | row index position | |
| column | Number | Column index position | |

**Return:** Scalar



{% tabs %}
{% tab title="Node" %}
```javascript
const dfd = require("danfojs-node")

let data = {
"Name": ["Apples", "Mango", "Banana", "Pear"],
"Count": [21, 5, 30, 10],
"Price": [200, 300, 40, 250]
}

let df = new dfd.DataFrame(data, { index: [1, "b", "c", "d"] })
df.iat(1, 2)

//output
300
```
{% endtab %}
{% endtabs %}
31 changes: 31 additions & 0 deletions api-reference/series/series.at.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
description: Access a single value for a row/column label pair.
---

# Series.at

> danfo.Series.at(label)
| Parameters | Type | Description | Default |
| ---------- | ------ | ----------------- | ------- |
| label | String | label to index by | |

**Return:** Scalar



{% tabs %}
{% tab title="Node" %}
```javascript
const dfd = require("danfojs-node")

let sf = new dfd.Series(["Apples", "Mango", "Banana", "Pear"],
{ index: ["a", "b", "c", "d"] }
)

sf.at("a")

// "Apples"
```
{% endtab %}
{% endtabs %}
31 changes: 31 additions & 0 deletions api-reference/series/series.iat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
description: Access a single value for a row/column pair by integer position.
---

# Series.iat

> danfo.Series.iat(index)
| Parameters | Type | Description | Default |
| ---------- | ------ | ------------ | ------- |
| index | Number | index value | |

**Return:** Scalar



{% tabs %}
{% tab title="Node" %}
```javascript
const dfd = require("danfojs-node")

let sf = new dfd.Series(["Apples", "Mango", "Banana", "Pear"],
{ index: ["a", "b", "c", "d"] }
)

sf.iat(1)

// "Mango"
```
{% endtab %}
{% endtabs %}

0 comments on commit aa43be1

Please sign in to comment.