Skip to content

Commit ab0132e

Browse files
docs: Fix sd doc code lines (#6063)
Signed-off-by: JiaWei Jiang <waynechuang97@gmail.com>
1 parent be4d009 commit ab0132e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/user_guide/data_types_and_io/structureddataset.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ First, initialize column types you want to extract from the `StructuredDataset`.
6868

6969
```{literalinclude} /examples/data_types_and_io/data_types_and_io/structured_dataset.py
7070
:caption: data_types_and_io/structured_dataset.py
71-
:lines: 31-32
71+
:lines: 36-37
7272
```
7373

7474
Define a task that opens a structured dataset by calling `all()`.
@@ -78,7 +78,7 @@ For instance, you can use ``pa.Table`` to convert the Pandas DataFrame to a PyAr
7878

7979
```{literalinclude} /examples/data_types_and_io/data_types_and_io/structured_dataset.py
8080
:caption: data_types_and_io/structured_dataset.py
81-
:lines: 42-52
81+
:lines: 47-57
8282
```
8383

8484
The code may result in runtime failures if the columns do not match.
@@ -91,7 +91,7 @@ and enable the CSV serialization by annotating the structured dataset with the C
9191

9292
```{literalinclude} /examples/data_types_and_io/data_types_and_io/structured_dataset.py
9393
:caption: data_types_and_io/structured_dataset.py
94-
:lines: 58-72
94+
:lines: 63-77
9595
```
9696

9797
## Storage driver and location
@@ -230,14 +230,14 @@ and the byte format, which in this case is `PARQUET`.
230230

231231
```{literalinclude} /examples/data_types_and_io/data_types_and_io/structured_dataset.py
232232
:caption: data_types_and_io/structured_dataset.py
233-
:lines: 128-130
233+
:lines: 133-135
234234
```
235235

236236
You can now use `numpy.ndarray` to deserialize the parquet file to NumPy and serialize a task's output (NumPy array) to a parquet file.
237237

238238
```{literalinclude} /examples/data_types_and_io/data_types_and_io/structured_dataset.py
239239
:caption: data_types_and_io/structured_dataset.py
240-
:lines: 135-148
240+
:lines: 140-153
241241
```
242242

243243
:::{note}
@@ -248,7 +248,7 @@ You can run the code locally as follows:
248248

249249
```{literalinclude} /examples/data_types_and_io/data_types_and_io/structured_dataset.py
250250
:caption: data_types_and_io/structured_dataset.py
251-
:lines: 152-156
251+
:lines: 157-161
252252
```
253253

254254
### The nested typed columns
@@ -261,7 +261,7 @@ Nested field StructuredDataset should be run when flytekit version > 1.11.0.
261261

262262
```{literalinclude} /examples/data_types_and_io/data_types_and_io/structured_dataset.py
263263
:caption: data_types_and_io/structured_dataset.py
264-
:lines: 158-285
264+
:lines: 163-290
265265
```
266266

267267
[flytesnacks]: https://github.com/flyteorg/flytesnacks/tree/master/examples/data_types_and_io/

0 commit comments

Comments
 (0)