From aa43be1715471ba7857db76c7fbab5bf2673447a Mon Sep 17 00:00:00 2001 From: Rising Odegua Date: Sun, 30 Jan 2022 11:18:59 +0000 Subject: [PATCH] GitBook: [#217] No subject --- SUMMARY.md | 4 +++ api-reference/dataframe/dataframe.at.md | 36 ++++++++++++++++++++++++ api-reference/dataframe/dataframe.iat.md | 36 ++++++++++++++++++++++++ api-reference/series/series.at.md | 31 ++++++++++++++++++++ api-reference/series/series.iat.md | 31 ++++++++++++++++++++ 5 files changed, 138 insertions(+) create mode 100644 api-reference/dataframe/dataframe.at.md create mode 100644 api-reference/dataframe/dataframe.iat.md create mode 100644 api-reference/series/series.at.md create mode 100644 api-reference/series/series.iat.md diff --git a/SUMMARY.md b/SUMMARY.md index d9a3ae2..303cc26 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -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) @@ -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) diff --git a/api-reference/dataframe/dataframe.at.md b/api-reference/dataframe/dataframe.at.md new file mode 100644 index 0000000..180413d --- /dev/null +++ b/api-reference/dataframe/dataframe.at.md @@ -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 %} diff --git a/api-reference/dataframe/dataframe.iat.md b/api-reference/dataframe/dataframe.iat.md new file mode 100644 index 0000000..c50f4f3 --- /dev/null +++ b/api-reference/dataframe/dataframe.iat.md @@ -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 %} diff --git a/api-reference/series/series.at.md b/api-reference/series/series.at.md new file mode 100644 index 0000000..887050c --- /dev/null +++ b/api-reference/series/series.at.md @@ -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 %} diff --git a/api-reference/series/series.iat.md b/api-reference/series/series.iat.md new file mode 100644 index 0000000..3f17e6b --- /dev/null +++ b/api-reference/series/series.iat.md @@ -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 %}