pitrou commented on a change in pull request #11028:
URL: https://github.com/apache/arrow/pull/11028#discussion_r721361757



##########
File path: python/pyarrow/tests/test_table.py
##########
@@ -1577,10 +1577,13 @@ def test_table_repr_to_string():
                        metadata={b'foo': b'bar'})
 
     tab = pa.table([pa.array([1, 2, 3, 4], type='int16'),
-                    pa.array([1, 2, 3, 4], type='int32')], schema=schema)
+                    pa.array([10, 20, 30, 40], type='int32')], schema=schema)
     assert str(tab) == """pyarrow.Table
 c0: int16
-c1: int32"""
+c1: int32
+----
+c0: [[1,2,3,4]]
+c1: [[10,20,30,40]]"""

Review comment:
       Cool, can you add a test for that?

##########
File path: python/pyarrow/array.pxi
##########
@@ -996,15 +996,19 @@ cdef class Array(_PandasConvertible):
         type_format = object.__repr__(self)
         return '{0}\n{1}'.format(type_format, str(self))
 
-    def to_string(self, int indent=0, int window=10):
+    def to_string(self, int indent=0, int window=10,
+                  c_bool skip_new_lines=False):

Review comment:
       We should probably make this new argument keyword-only.

##########
File path: python/pyarrow/table.pxi
##########
@@ -63,18 +63,22 @@ cdef class ChunkedArray(_PandasConvertible):
         type_format = object.__repr__(self)
         return '{0}\n{1}'.format(type_format, str(self))
 
-    def to_string(self, int indent=0, int window=10):
+    def to_string(self, int indent=0, int window=10,
+                  c_bool skip_new_lines=False):

Review comment:
       Same here.

##########
File path: python/pyarrow/table.pxi
##########
@@ -1226,7 +1230,7 @@ cdef class Table(_PandasConvertible):
         raise TypeError("Do not call Table's constructor directly, use one of "
                         "the `Table.from_*` functions instead.")
 
-    def to_string(self, show_metadata=False):
+    def to_string(self, show_metadata=False, preview_cols=0):

Review comment:
       1) Should we make all arguments keyword-only?
   2) The new argument should be documented below




-- 
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]


Reply via email to