Skip to content

Commit fc58d23

Browse files
risenWgitbook-bot
authored andcommitted
GitBook: [master] 55 pages modified
1 parent c4acb64 commit fc58d23

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+309
-276
lines changed

SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
* [Series.values](api-reference/series/series.values.md)
7878
* [Series.tensor](api-reference/series/series.tensor.md)
7979
* [Series.index](api-reference/series/series.index.md)
80-
* [Series.toString](api-reference/series/series.tostring.md)
8180
* [Series.apply](api-reference/series/series.apply.md)
8281
* [Series.map](api-reference/series/series.map.md)
8382
* [Series.set\_index](api-reference/series/series.set_index.md)

api-reference/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@ description: >-
4646
* [Tables](plotting/tables.md)
4747
* [Box Plots](plotting/box-plots.md)
4848
* [Violin Plots](plotting/violin-plots.md)
49-
* [Density Plots]()
5049
* [Timeseries Plots](plotting/timeseries-plots.md)
5150
* [GroupBy](https://pandas.pydata.org/pandas-docs/stable/reference/groupby.html)
52-
* [Indexing, iteration](https://pandas.pydata.org/pandas-docs/stable/reference/groupby.html#indexing-iteration)
53-
* [Function application](https://pandas.pydata.org/pandas-docs/stable/reference/groupby.html#function-application)
54-
* [Computations / descriptive stats](https://pandas.pydata.org/pandas-docs/stable/reference/groupby.html#computations-descriptive-stats)
51+
* [Indexing, iteration](groupby/#indexing-iteration)
52+
* [Function application](groupby/#function-application)
53+
* [Computations / descriptive stats](groupby/#computations-descriptive-stats)
5554

5655

5756

api-reference/dataframe/README.md

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description: 'Two-dimensional, size-mutable, potentially heterogeneous tabular d
1212
| :--- | :--- |
1313
| [`DataFrame.columns`](danfo.dataframe.column.md) | The column labels of the DataFrame. |
1414

15-
| [`DataFrame.dtypes`](dataframe.dtypes.md) | Return the dtypes in the DataFrame. |
15+
| [`DataFrame.ctypes`](dataframe.dtypes.md) | Return the data types in the DataFrame. |
1616
| :--- | :--- |
1717
| [`DataFrame.select_dtypes`](dataframe.select_dtypes.md) | Return a subset of the DataFrame’s columns based on the column dtypes. |
1818
| [`DataFrame.values`](dataframe.values.md) | Return a Numpy representation of the DataFrame. |
@@ -25,11 +25,11 @@ description: 'Two-dimensional, size-mutable, potentially heterogeneous tabular d
2525

2626
| [`DataFrame.astype`](dataframe.astype.md) | Cast a pandas object to a specified dtype `dtype`. |
2727
| :--- | :--- |
28-
| [`DataFrame.copy`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.copy.html#pandas.DataFrame.copy) | Make a copy of this object’s indices and data. |
28+
| [`DataFrame.copy`](danfo.dataframe.copy.md) | Make a copy of this object’s indices and data. |
2929

3030
### Indexing, iteration
3131

32-
| [`DataFrame.head`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.head.html#pandas.DataFrame.head) | Return the first n rows |
32+
| [`DataFrame.head`](danfo.dataframe.head.md) | Return the first n rows |
3333
| :--- | :--- |
3434
| [`DataFrame.loc`](danfo.dataframe.loc.md) | Access a group of rows and columns by label\(s\) or a boolean array. |
3535
| [`DataFrame.iloc`](danfo.dataframe.iloc.md) | Purely integer-location based indexing for selection by position. |
@@ -56,7 +56,7 @@ description: 'Two-dimensional, size-mutable, potentially heterogeneous tabular d
5656

5757
| [`DataFrame.apply`](danfo.dataframe.apply.md) | Apply a function along an axis of the DataFrame. |
5858
| :--- | :--- |
59-
| [`DataFrame.groupby`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.groupby.html#pandas.DataFrame.groupby) | Group DataFrame using a mapper or by a Series of columns. |
59+
| [`DataFrame.groupby`](../groupby/) | Group DataFrame using a mapper or by a Series of columns. |
6060
| [`DataFrame.map`](../series/series.map.md) | Map a function on Object along an axis to DataFrame |
6161

6262
### Computations / descriptive stats
@@ -86,11 +86,11 @@ description: 'Two-dimensional, size-mutable, potentially heterogeneous tabular d
8686
| | |
8787
| :--- | :--- |
8888
| [`DataFrame.drop`](dataframe.drop.md) | Drop specified labels from rows or columns. |
89-
| [`DataFrame.head`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.head.html#pandas.DataFrame.head) | Return the first n rows. |
90-
| [`DataFrame.rename`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.rename.html#pandas.DataFrame.rename) | Alter axes labels. |
89+
| [`DataFrame.head`](danfo.dataframe.head.md) | Return the first n rows. |
90+
| [`DataFrame.rename`](dataframe.rename.md) | Alter axes labels. |
9191
| [`DataFrame.reset_index`](dataframe.reset_index.md) | Reset the index of a DataFrame |
9292
| [`DataFrame.sample`](danfo.dataframe.sample.md) | Return a random sample of items from an axis of object. |
93-
| [`DataFrame.set_index`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.set_index.html#pandas.DataFrame.set_index) | Set the DataFrame index using existing columns. |
93+
| [`DataFrame.set_index`](dataframe.set_index.md) | Set the DataFrame index using existing columns. |
9494
| [`DataFrame.tail`](danfo.dataframe.tail.md) | Return the last n rows. |
9595

9696
### Missing data handling
@@ -108,44 +108,35 @@ description: 'Two-dimensional, size-mutable, potentially heterogeneous tabular d
108108
| :--- | :--- |
109109
| [`DataFrame.sort_values`](dataframe.sort_values.md) | Sort by the values along either axis. |
110110
| [`DataFrame.T`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.T.html#pandas.DataFrame.T) | Return transpose of DataFrame |
111-
| [`DataFrame.transpose`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.transpose.html#pandas.DataFrame.transpose) | Transpose index and columns. |
112111

113112
### Combining / comparing / joining / merging
114113

115114
| | |
116115
| :--- | :--- |
117116
| [`DataFrame.addColumn`](danfo.dataframe.addcolumn.md) | Add new columns to a DataFrame. |
118-
| [`DataFrame.concat`]() | Concatenate DataFrames together. |
119-
| [`DataFrame.merge`]() | Merge DataFrame or named Series objects with a database-style join. |
120-
121-
117+
| [`DataFrame.concat`](../general-functions/danfo.concat.md) | Concatenate DataFrames together. |
118+
| [`DataFrame.merge`](../general-functions/danfo.merge.md) | Merge DataFrame or named Series objects with a database-style join. |
122119

123120
### Plotting
124121

125-
`DataFrame.plot` exposes different plot methods that work in the browser. All plots are compatible with Plotly API.
126-
127-
| [`DataFrame.plot`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.html#pandas.DataFrame.plot) | DataFrame plotting accessor and method |
128-
| :--- | :--- |
129-
122+
`Series.plot` is both a callable method and a namespace attribute for specific plotting methods of the form `Series.plot.<kind>`.
130123

131124
| | |
132125
| :--- | :--- |
133-
| [`DataFrame.plot.bar`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.bar.html#pandas.DataFrame.plot.bar) | Vertical bar plot. |
134-
| [`DataFrame.plot.box`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.box.html#pandas.DataFrame.plot.box) | Make a box plot of the DataFrame columns. |
135-
| [`DataFrame.plot.density`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.density.html#pandas.DataFrame.plot.density) | Generate Kernel Density Estimate plot using Gaussian kernels. |
136-
| [`DataFrame.plot.hist`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.hist.html#pandas.DataFrame.plot.hist) | Draw one histogram of the DataFrame’s columns. |
137-
| [`DataFrame.plot.kde`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.kde.html#pandas.DataFrame.plot.kde) | Generate Kernel Density Estimate plot using Gaussian kernels. |
138-
| [`DataFrame.plot.line`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.line.html#pandas.DataFrame.plot.line) | Plot Series or DataFrame as lines. |
139-
| [`DataFrame.plot.pie`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.pie.html#pandas.DataFrame.plot.pie) | Generate a pie plot. |
140-
| [`DataFrame.plot.scatter`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.scatter.html#pandas.DataFrame.plot.scatter) | Create a scatter plot with varying marker point size and color. |
126+
| [DataFrame.plot.bar](../plotting/bar-charts.md) | Vertical bar plot. |
127+
| [`DataFrame.plot.box`](../plotting/box-plots.md) | Make a box plot of the DataFrame columns. |
128+
| [`DataFrame.plot.violin`](../plotting/box-plots.md) | Make a violin plot of the DataFrame columns. |
129+
| [`DataFrame.plot.hist`](../plotting/histograms.md) | Draw one histogram of the DataFrame’s columns. |
130+
| [`DataFrame.plot.scatter`](../plotting/scatter-plots.md) | Generate Kernel Density Estimate plot using Gaussian kernels. |
131+
| [`DataFrame.plot.line`](../plotting/line-charts.md) | Plot Series or DataFrame as lines. |
132+
| [`DataFrame.plot.pie`](../plotting/pie-charts.md) | Generate a pie plot. |
133+
| [`Timeseries Plots`](../plotting/timeseries-plots.md) | Time series plots |
134+
| [`Table`](../plotting/tables.md) | Display Series as Interactive table in Div |
141135

142136
### Serialization / IO / conversion
143137

144138
| | |
145139
| :--- | :--- |
146140
| [`DataFrame.to_csv`](dataframe.to_csv.md) | Write object to a comma-separated values \(csv\) file. |
147141
| [`DataFrame.to_json`](dataframe.to_json.md) | Convert the object to a JSON string. |
148-
| [`DataFrame.to_table`]() | Render a DataFrame as an HTML table. |
149-
| [`DataFrame.toString`](../series/series.tostring.md) | Render a DataFrame to a console-friendly tabular output. |
150-
| [`DataFrame.print`](dataframe.print.md) | Display a DataFrame to a console friendly output. |
151142

api-reference/dataframe/danfo.dataframe.addcolumn.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ New columns get added at the end of the DataFrame, and this happens so returns
4141
{% tabs %}
4242
{% tab title="Node" %}
4343
```javascript
44-
let data = [{"A": [30, 1, 2, 3]},
45-
{"B": [34, 4, 5, 6]},
46-
{"C": [20, 20, 30, 40]}]
44+
const dfd = require("danfojs-node")
45+
let data = {"A": [30, 1, 2, 3],
46+
"B": [34, 4, 5, 6],
47+
"C": [20, 20, 30, 40]}
4748

4849
let df = new dfd.DataFrame(data)
4950
df.print()

api-reference/dataframe/danfo.dataframe.column.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ danfo.DataFrame.**column**\(col\_name\) \[[source](https://github.com/opensource
2121
{% tabs %}
2222
{% tab title="Node" %}
2323
```javascript
24+
const dfd = require("danfojs-node")
2425
let data = [{ "Name": ["Apples", "Mango", "Banana", undefined] },
2526
{ "Count": [NaN, 5, NaN, 10] },
2627
{ "Price": [200, 300, 40, 250] }]

api-reference/dataframe/danfo.dataframe.fillna.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ danfo.DataFrame.**fillna**\(kwargs\) \[[source](https://github.com/opensource9ja
4343
{% tabs %}
4444
{% tab title="Node" %}
4545
```javascript
46-
const dfd = require("danfojs")
46+
const dfd = require("danfojs-node")
4747

48-
let data = [{"Name":["Apples", "Mango", "Banana", undefined]},
49-
{"Count": [NaN, 5, NaN, 10]},
50-
{"Price": [200, 300, 40, 250]}]
48+
let data = {"Name":["Apples", "Mango", "Banana", undefined],
49+
"Count": [NaN, 5, NaN, 10],
50+
"Price": [200, 300, 40, 250]}
51+
5152
let df = new dfd.DataFrame(data)
5253
df.print()
5354

@@ -103,11 +104,11 @@ df_filled.print()
103104
{% tabs %}
104105
{% tab title="Node" %}
105106
```javascript
106-
const dfd = require("danfojs")
107+
const dfd = require("danfojs-node")
107108

108-
let data = [{ "Name": ["Apples", "Mango", "Banana", undefined] },
109-
{ "Count": [NaN, 5, NaN, 10] },
110-
{ "Price": [200, 300, 40, 250] }]
109+
let data = {"Name":["Apples", "Mango", "Banana", undefined],
110+
"Count": [NaN, 5, NaN, 10],
111+
"Price": [200, 300, 40, 250]}
111112

112113
let df = new dfd.DataFrame(data)
113114
let df_filled = df.fillna({ values: ["Apples"] })

api-reference/dataframe/danfo.dataframe.groupby.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ danfo.DataFrame.**groupby**\(columns\) \[[source](https://github.com/opensource9
2121
{% tabs %}
2222
{% tab title="Node" %}
2323
```javascript
24+
const dfd = require("danfojs-node")
2425
let data = [[1, 2, 3], [4, 5, 6], [20, 30, 40], [39, 89, 78]]
2526
let cols = ["A", "B", "C"]
2627
let df = new DataFrame(data, { columns: cols })

api-reference/dataframe/danfo.dataframe.isna.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ danfo.DataFrame.**isna**\(kwargs\) \[[source](https://github.com/opensource9ja/d
1818
{% tabs %}
1919
{% tab title="Node" %}
2020
```javascript
21-
const dfd = require("danfojs")
21+
const dfd = require("danfojs-node")
2222

2323
let data = [[1, 2, 3], [NaN, 5, 6], [NaN, 30, 40], [39, undefined, 78]]
2424
let cols = ["A", "B", "C"]

api-reference/dataframe/dataframe.astype.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ danfo.DataFrame.**astype**\(kwargs\) \[[source](https://github.com/opensource9ja
4141
{% tabs %}
4242
{% tab title="Node" %}
4343
```javascript
44-
const dfd = require("danfojs")
44+
const dfd = require("danfojs-node")
4545

46-
let data = [{ "A": [-20.1, 30, 47.3, -20] },
47-
{ "B": [34, -4, 5, 6] },
48-
{ "C": [20.1, -20.23, 30.3, 40.11] },
49-
{ "D": ["a", "b", "c", "c"] }]
46+
let data = { "A": [-20.1, 30, 47.3, -20] ,
47+
"B": [34, -4, 5, 6],
48+
"C": [20.1, -20.23, 30.3, 40.11],
49+
"D": ["a", "b", "c", "c"] }
5050

5151
let df = new dfd.DataFrame(data)
5252
df.print()
@@ -129,12 +129,12 @@ df.ctypes.print()
129129
{% tabs %}
130130
{% tab title="Node" %}
131131
```javascript
132-
const dfd = require("danfojs")
132+
const dfd = require("danfojs-node")
133133

134-
let data = [{ "A": [-20.1, 30, 47.3, -20] },
135-
{ "B": [34, -4, 5, 6] },
136-
{ "C": [20.1, -20.23, 30.3, 40.11] },
137-
{ "D": ["a", "b", "c", "c"] }]
134+
let data = { "A": [-20.1, 30, 47.3, -20] ,
135+
"B": [34, -4, 5, 6],
136+
"C": [20.1, -20.23, 30.3, 40.11],
137+
"D": ["a", "b", "c", "c"] }
138138

139139
let df = new dfd.DataFrame(data)
140140
let df_new = df.astype({column: "D", dtype: "int32"})
@@ -189,12 +189,12 @@ df.ctypes.print()
189189
{% tabs %}
190190
{% tab title="Node" %}
191191
```javascript
192-
const dfd = require("danfojs")
192+
const dfd = require("danfojs-node")
193193

194-
let data = [{ "A": [-20.1, 30, 47.3, -20] },
195-
{ "B": [34, -4, 5, 6] },
196-
{ "C": [20.1, -20.23, 30.3, 40.11] },
197-
{ "D": ["a", "b", "c", "c"] }]
194+
let data = { "A": [-20.1, 30, 47.3, -20] ,
195+
"B": [34, -4, 5, 6],
196+
"C": [20.1, -20.23, 30.3, 40.11],
197+
"D": ["a", "b", "c", "c"] }
198198

199199
let df = new dfd.DataFrame(data)
200200
let df_new = df.astype({column: "D", dtype: "int32"})

api-reference/dataframe/dataframe.drop.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ By setting **inplace** to _true_, the original DataFrame is modified and nothing
4848
{% tabs %}
4949
{% tab title="Node" %}
5050
```javascript
51-
const dfd = require("danfojs")
51+
const dfd = require("danfojs-node")
5252

53-
let data = [{ "A": [-20, 30, 47.3, -20] },
54-
{ "B": [34, -4, 5, 6] },
55-
{ "C": [20, 20, 30, 30] },
56-
{ "D": ["a", "b", "c", "c"] }]
53+
let data = { "A": [-20, 30, 47.3, -20],
54+
"B": [34, -4, 5, 6] ,
55+
"C": [20, 20, 30, 30],
56+
"D": ["a", "b", "c", "c"] }
5757

5858
let df = new dfd.DataFrame(data)
5959
df.drop({ columns: ["C", "B"], axis: 1, inplace: true });
@@ -91,12 +91,12 @@ df.print()
9191
{% tabs %}
9292
{% tab title="Node" %}
9393
```javascript
94-
const dfd = require("danfojs")
94+
const dfd = require("danfojs-node")
9595

96-
let data = [{ "A": [-20, 30, 47.3, -20] },
97-
{ "B": [34, -4, 5, 6] },
98-
{ "C": [20, 20, 30, 30] },
99-
{ "D": ["a", "b", "c", "c"] }]
96+
let data = { "A": [-20, 30, 47.3, -20],
97+
"B": [34, -4, 5, 6] ,
98+
"C": [20, 20, 30, 30],
99+
"D": ["a", "b", "c", "c"] }
100100

101101
let df = new dfd.DataFrame(data)
102102
df.drop({ index: [0, 2], axis: 0, inplace: true });
@@ -131,12 +131,12 @@ df.print()
131131
{% tabs %}
132132
{% tab title="Node" %}
133133
```javascript
134-
const dfd = require("danfojs")
134+
const dfd = require("danfojs-node")
135135

136-
let data = [{ "A": [-20, 30, 47.3, -20] },
137-
{ "B": [34, -4, 5, 6] },
138-
{ "C": [20, 20, 30, 30] },
139-
{ "D": ["a", "b", "c", "c"] }]
136+
let data = { "A": [-20, 30, 47.3, -20],
137+
"B": [34, -4, 5, 6] ,
138+
"C": [20, 20, 30, 30],
139+
"D": ["a", "b", "c", "c"] }
140140

141141
let df = new dfd.DataFrame(data, {index: ["a", "b", "c", "d"]})
142142
df.drop({ index: ["a", "c"], axis: 0, inplace: true });

0 commit comments

Comments
 (0)