-
Notifications
You must be signed in to change notification settings - Fork 20
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
1 parent
bf7505d
commit aa43be1
Showing
5 changed files
with
138 additions
and
0 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
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 |
---|---|---|
@@ -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 %} |
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 |
---|---|---|
@@ -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 %} |
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 |
---|---|---|
@@ -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 %} |
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 |
---|---|---|
@@ -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 %} |