[ 
https://issues.apache.org/jira/browse/ARROW-2181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16394292#comment-16394292
 ] 

ASF GitHub Bot commented on ARROW-2181:
---------------------------------------

wesm closed pull request #1733: ARROW-2181: [PYTHON][DOC] Add doc on usage of 
concat_tables
URL: https://github.com/apache/arrow/pull/1733
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/doc/source/data.rst b/python/doc/source/data.rst
index 3a602d54c5..07172604a3 100644
--- a/python/doc/source/data.rst
+++ b/python/doc/source/data.rst
@@ -393,6 +393,22 @@ objects to contiguous NumPy arrays for use in pandas:
 
    c.to_pandas()
 
+Multiple tables can also be concatenated together to form a single table using
+``pyarrow.concat_tables``, if the schemas are equal:
+
+.. ipython:: python
+
+   tables = [table] * 2
+   table_all = pa.concat_tables(tables)
+   table_all.num_rows
+   c = table_all[0]
+   c.data.num_chunks
+
+This is similar to ``Table.from_batches``, but uses tables as input instead of
+record batches. Record batches can be made into tables, but not the other way
+around, so if your data is already in table form, then use
+``pyarrow.concat_tables``.
+
 Custom Schema and Field Metadata
 --------------------------------
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [Python] Add concat_tables to API reference, add documentation on use
> ---------------------------------------------------------------------
>
>                 Key: ARROW-2181
>                 URL: https://issues.apache.org/jira/browse/ARROW-2181
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Wes McKinney
>            Assignee: Bryan Cutler
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> This omission of documentation was mentioned on the mailing list on February 
> 13. The documentation should illustrate the contrast between 
> {{Table.from_batches}} and {{concat_tables}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to