Skip to content

Commit 59d4e65

Browse files
committed
2 parents 14a89ee + e5c5f68 commit 59d4e65

20 files changed

+54
-45
lines changed
30.1 KB
Loading
30.1 KB
Loading
30.1 KB
Loading
49.2 KB
Loading
49.2 KB
Loading
49.2 KB
Loading
49.2 KB
Loading

api-reference/dataframe/dataframe.to_csv.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ description: Convert DataFrame to a comma-separated values (CSV)
44

55
# DataFrame.toCSV
66

7-
DataFrame.toCSV(options) 
7+
{% hint style="danger" %}
8+
Deprecated in v1.1.0: Use the [`dfd.toCSV`](../input-output/danfo.to\_csv.md) function directly instead
9+
{% endhint %}
810

9-
| | | | |
10-
| -------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
11-
| **Parameters** | Type | Description | Default |
12-
| **options** | object, optional | <p>Configuration object:</p><p></p><p><strong><code>filePath</code></strong>: Local file path to write the CSV file to. If not specified, the CSV will be returned as a string. Only needed in Nodejs version</p><p><br><strong><code>fileName</code></strong>: The name of the file to download as. Only needed in browser environment.</p><p><br><strong><code>download</code></strong>: Boolean indicating whether to automatically download the CSV file in the browser. Only needed in the browser environment.</p><p></p><p><strong><code>header</code></strong>: Boolean indicating whether to include a header row in the CSV file.</p><p></p><p><strong><code>sep</code></strong>: Character to be used as a separator in the CSV file.</p><p></p> | <p>{<br><strong>sep</strong>: ","<br>}</p> |
11+
DataFrame.toCSV(options)
12+
13+
| | | | |
14+
| -------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
15+
| **Parameters** | Type | Description | Default |
16+
| **options** | object, optional | <p>Configuration object:</p><p><strong><code>filePath</code></strong>: Local file path to write the CSV file to. If not specified, the CSV will be returned as a string. Only needed in Nodejs version</p><p><br><strong><code>fileName</code></strong>: The name of the file to download as. Only needed in browser environment.</p><p><br><strong><code>download</code></strong>: Boolean indicating whether to automatically download the CSV file in the browser. Only needed in the browser environment.</p><p><strong><code>header</code></strong>: Boolean indicating whether to include a header row in the CSV file.</p><p><strong><code>sep</code></strong>: Character to be used as a separator in the CSV file.</p> | <p>{<br><strong>sep</strong>: ","<br>}</p> |
1317

1418
The **toCSV** function can be used to write out a DataFrame or Series to CSV file. The output is configurable and will depend on the environment. In the following examples, we show you how to write/download a CSV file from Node and Browser environments.
1519

api-reference/dataframe/dataframe.to_excel.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ description: >-
66

77
# DataFrame.toExcel
88

9-
> DataFrame.toExcel(options)&#x20;
9+
{% hint style="danger" %}
10+
Deprecated in v1.1.0: Use the [`dfd.toExcel`](../input-output/danfo.to\_excel.md) function directly instead
11+
{% endhint %}
1012

11-
| **Parameters** | Type | Description | Default |
12-
| -------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
13-
| **options** | object, optional | <p>Configuration object:</p><p></p><p><strong><code>filePath</code></strong>: Local file path to write the CSV file to. If not specified, the CSV will be returned as a string. Only needed in Nodejs version</p><p><br><strong><code>fileName</code></strong>: The name of the file to download as. Only needed in the browser environment.</p><p><br><strong><code>sheetName</code></strong>: Name to call the excel sheet.</p><p></p> | <p>{<br><strong>filePath</strong>: "./output.xlsx",<br><strong>sheetName</strong>: "Sheet1"<br><br>}</p> |
13+
> DataFrame.toExcel(options)
14+
15+
| **Parameters** | Type | Description | Default |
16+
| -------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
17+
| **options** | object, optional | <p>Configuration object:</p><p><strong><code>filePath</code></strong>: Local file path to write the CSV file to. If not specified, the CSV will be returned as a string. Only needed in Nodejs version</p><p><br><strong><code>fileName</code></strong>: The name of the file to download as. Only needed in the browser environment.</p><p><br><strong><code>sheetName</code></strong>: Name to call the excel sheet.</p> | <p>{<br><strong>filePath</strong>: "./output.xlsx",<br><strong>sheetName</strong>: "Sheet1"<br><br>}</p> |
1418

1519
The **toExcel** function can be used to write out a DataFrame or Series to Excel (**.xlsx**) file. The output format will depend on the environment. In the following examples, we show you how to write/download an Excel file from Node and Browser environments.
1620

api-reference/dataframe/dataframe.to_json.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ description: Convert DataFrame to JSON format
44

55
# DataFrame.toJSON
66

7-
> DataFrame.toJSON(options)&#x20;
7+
{% hint style="danger" %}
8+
Deprecated in v1.1.0: Use the [dfd.toJSON](../input-output/danfo.to\_json.md) function directly instead
9+
{% endhint %}
810

9-
| | | | |
10-
| -------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
11-
| **Parameters** | Type | Description | Default |
12-
| **options** | object, optional | <p>Configuration object:</p><p></p><p><strong><code>filePath</code></strong>: Local file path to write the CSV file to. If not specified, the CSV will be returned as a string. Only needed in Nodejs version</p><p><br><strong><code>fileName</code></strong>: The name of the file to download as. Only needed in browser environment.</p><p><br><strong><code>format</code></strong>: The format of the JSON. Can be one of <strong><code>row</code></strong> or <strong><code>column</code></strong>.</p><p></p> | <p>{<br><strong><code>format</code></strong>: "column"<br>}</p> |
11+
> DataFrame.toJSON(options)
12+
13+
| | | | |
14+
| -------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- |
15+
| **Parameters** | Type | Description | Default |
16+
| **options** | object, optional | <p>Configuration object:</p><p><strong><code>filePath</code></strong>: Local file path to write the CSV file to. If not specified, the CSV will be returned as a string. Only needed in Nodejs version</p><p><br><strong><code>fileName</code></strong>: The name of the file to download as. Only needed in browser environment.</p><p><br><strong><code>format</code></strong>: The format of the JSON. Can be one of <strong><code>row</code></strong> or <strong><code>column</code></strong>.</p> | <p>{<br><strong><code>format</code></strong>: "column"<br>}</p> |
1317

1418
The **toJSON** function can be used to write out a DataFrame or Series to JSON format/file. The output is configurable and will depend on the environment. In the following examples, we show you how to write/download a JSON file from Node and Browser environments.
1519

api-reference/general-functions/danfo.dt.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ description: Accessor object for date time properties of the Series values.
44

55
# danfo.Dt
66

7-
For example, in the following example, we convert a Series to an `Dt` instance and apply a couple of **DateTime** methods.&#x20;
7+
For example, in the following example, we convert a Series to an `Dt` instance and apply a couple of **DateTime** methods.
88

99
{% tabs %}
1010
{% tab title="Node" %}
1111
```javascript
12-
import { Dt, Series } from "danfojs-node-nightly"
12+
import { Dt, Series } from "danfojs-node"
1313

1414
const sf = new Series(["1/1/2000", "1/2/2000", "2/3/2000", "1/4/2000", "4/5/2000"])
1515
const dtS = new Dt(sf)
@@ -45,5 +45,4 @@ dtS.monthName().print()
4545
╟───┼──────────╢
4646
║ 4 │ April ║
4747
╚═══╧══════════╝
48-
4948
```

0 commit comments

Comments
 (0)