Skip to content
Permalink
Browse files
Creating tables recipe (#51)
  • Loading branch information
amol- committed Sep 1, 2021
1 parent 574be8e commit 60898b17cb875f73c03ed6cffeba6ee695a28d96
Showing 1 changed file with 26 additions and 0 deletions.
@@ -7,6 +7,32 @@ Tensors and all other Arrow entities.

.. contents::

Creating Tables
===============

Arrow supports tabular data in :class:`pyarrow.Table`: each column
is represented by a :class:`pyarrow.ChunkedArray` and tables can be created
by pairing multiple arrays with names for their columns

.. testcode::

import pyarrow as pa

table = pa.table([
pa.array([1, 2, 3, 4, 5]),
pa.array(["a", "b", "c", "d", "e"]),
pa.array([1.0, 2.0, 3.0, 4.0, 5.0])
], names=["col1", "col2", "col3"])

print(table)

.. testoutput::

pyarrow.Table
col1: int64
col2: string
col3: double

Create Table from Plain Types
=============================

0 comments on commit 60898b1

Please sign in to comment.