pitrou commented on a change in pull request #81:
URL: https://github.com/apache/arrow-cookbook/pull/81#discussion_r728793413



##########
File path: python/source/data.rst
##########
@@ -182,6 +182,54 @@ We can combine them into a single table using 
:func:`pyarrow.concat_tables`:
   cast data from one type to another (if `promote=True`).  In such cases the 
data 
   will need to be copied and an extra cost will occur.
 
+Adding a column to an existing Table
+====================================
+
+If you have a table it is possible to extend its columns using
+:meth:`pyarrow.Table.append_column`
+
+Suppose we have a table with oscar nominations for each actress
+
+.. testcode::
+
+  import pyarrow as pa
+
+  oscar_nominations = pa.table([
+    ["Meryl Streep", "Katharine Hepburn"],
+    [21, 12]
+  ], names=["actor", "nominations"])

Review comment:
       Right, the only reason I am pointing this out is because of the 
inconsistency (the sentence above says "actress" but the table says "actor").




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