tadeja commented on code in PR #48619:
URL: https://github.com/apache/arrow/pull/48619#discussion_r2706020043
##########
docs/source/python/extending_types.rst:
##########
@@ -530,12 +548,14 @@ in the numpy ndarray:
>>> numpy_tensor
array([[[ 1., 2.],
[ 3., 4.]],
+ <BLANKLINE>
[[ 10., 20.],
[ 30., 40.]],
+ <BLANKLINE>
[[100., 200.],
- [300., 400.]]])
+ [300., 400.]]], dtype=float32)
>>> numpy_tensor.shape
- (3, 2, 2)
+ (3, 2, 2)
Review Comment:
```suggestion
[300., 400.]]], dtype=float32)
>>> numpy_tensor.shape
(3, 2, 2)
```
Useless nitpick - 4th leading space can be removed as main code lines above
seem to have 3 spaces.
##########
docs/source/python/dataset.rst:
##########
@@ -722,17 +799,35 @@ call. For simple datasets it may be possible to know
which files will be create
larger or partitioned datasets it is not so easy. The ``file_visitor``
keyword can be used
to supply a visitor that will be called as each file is created:
-.. ipython:: python
+.. code-block:: python
- def file_visitor(written_file):
- print(f"path={written_file.path}")
- print(f"size={written_file.size} bytes")
- print(f"metadata={written_file.metadata}")
+ >>> def file_visitor(written_file):
+ ... print(f"path={written_file.path}")
+ ... print(f"size={written_file.size} bytes")
+ ... print(f"metadata={written_file.metadata}")
-.. ipython:: python
+.. code-block:: python
- ds.write_dataset(table, "dataset_visited", format="parquet",
partitioning=part,
- file_visitor=file_visitor)
+ >>> ds.write_dataset(table, "dataset_visited", format="parquet",
partitioning=part,
+ ... file_visitor=file_visitor)
+ path=dataset_visited/c=.../part-0.parquet
+ size=824 bytes
+ metadata=<pyarrow._parquet.FileMetaData object at ...>
+ created_by: parquet-cpp-arrow version 23.0.0-SNAPSHOT
Review Comment:
```suggestion
size=... bytes
metadata=<pyarrow._parquet.FileMetaData object at ...>
created_by: parquet-cpp-arrow version ...
```
##########
docs/source/python/dataset.rst:
##########
@@ -722,17 +799,35 @@ call. For simple datasets it may be possible to know
which files will be create
larger or partitioned datasets it is not so easy. The ``file_visitor``
keyword can be used
to supply a visitor that will be called as each file is created:
-.. ipython:: python
+.. code-block:: python
- def file_visitor(written_file):
- print(f"path={written_file.path}")
- print(f"size={written_file.size} bytes")
- print(f"metadata={written_file.metadata}")
+ >>> def file_visitor(written_file):
+ ... print(f"path={written_file.path}")
+ ... print(f"size={written_file.size} bytes")
+ ... print(f"metadata={written_file.metadata}")
-.. ipython:: python
+.. code-block:: python
- ds.write_dataset(table, "dataset_visited", format="parquet",
partitioning=part,
- file_visitor=file_visitor)
+ >>> ds.write_dataset(table, "dataset_visited", format="parquet",
partitioning=part,
+ ... file_visitor=file_visitor)
+ path=dataset_visited/c=.../part-0.parquet
+ size=824 bytes
+ metadata=<pyarrow._parquet.FileMetaData object at ...>
+ created_by: parquet-cpp-arrow version 23.0.0-SNAPSHOT
+ num_columns: 2
+ num_rows: 5
+ num_row_groups: 1
+ format_version: 2.6
+ serialized_size: 0
+ path=dataset_visited/c=.../part-0.parquet
+ size=826 bytes
+ metadata=<pyarrow._parquet.FileMetaData object at ...>
+ created_by: parquet-cpp-arrow version 23.0.0-SNAPSHOT
Review Comment:
```suggestion
size=... bytes
metadata=<pyarrow._parquet.FileMetaData object at ...>
created_by: parquet-cpp-arrow version ...
```
##########
docs/source/python/extending_types.rst:
##########
@@ -530,12 +548,14 @@ in the numpy ndarray:
>>> numpy_tensor
array([[[ 1., 2.],
[ 3., 4.]],
+ <BLANKLINE>
[[ 10., 20.],
[ 30., 40.]],
+ <BLANKLINE>
[[100., 200.],
- [300., 400.]]])
+ [300., 400.]]], dtype=float32)
>>> numpy_tensor.shape
- (3, 2, 2)
+ (3, 2, 2)
Review Comment:
```suggestion
[300., 400.]]], dtype=float32)
>>> numpy_tensor.shape
(3, 2, 2)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]