Skip to content

Commit

Permalink
Fix import and export doc (#2380)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

Update doc of import and export parquet file 

### Type of change

- [x] Documentation Update

Signed-off-by: Jin Hai <[email protected]>
  • Loading branch information
JinHai-CN authored Dec 17, 2024
1 parent fa922af commit a76149c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/references/pysdk_api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1403,6 +1403,7 @@ Example: `{"header":True, "delimiter": "\t", file_type}`
- `csv`
- `json`
- `jsonl`
- `parquet`

#### Returns

Expand All @@ -1428,6 +1429,12 @@ table_object.import_data(os.getcwd() + "/your_file.csv", {"header": False, "file
table_object.import_data(os.getcwd() + "/your_file.jsonl", {"file_type": "jsonl"})
```

##### Import a parquet file

```python
table_object.import_data(os.getcwd() + "/your_file.parquet", {"file_type": "parquet"})
```

---

### export_data
Expand Down Expand Up @@ -1460,6 +1467,7 @@ Example: `{"header": False, "delimiter": "\t", "file_type": "jsonl", "offset": 2
The type of the exported file. Supported file types include:
- `csv`
- `jsonl`
- `parquet`

- **offset**: `int`, *Optional*
Index specifying the starting row for export. Usually used in conjunction with `limit`. If not specified, the file export starts from the first row.
Expand Down Expand Up @@ -1498,6 +1506,12 @@ table_object.export_data(os.getcwd() + "/export_data.csv", {"header": True, "fil
table_object.export_data(os.getcwd() + "/export_data.jsonl", {"file_type": "jsonl", "offset": 1, "limit": 8, "row_limit": 2}, ["num", "name", "score"])
```

##### Export your table to a parquet file

```python
table_object.export_data(os.getcwd() + "/export_data.parquet", {"file_type": "parquet")
```

---

### delete
Expand Down

0 comments on commit a76149c

Please sign in to comment.