MCPcopy Create free account
hub / github.com/apache/arrow / read_table

Method read_table

python/pyarrow/feather.py:56–79  ·  view source on GitHub ↗

Read multiple feather files as a single pyarrow.Table Parameters ---------- columns : List[str] Names of columns to read from the file Returns ------- pyarrow.Table Content of the file as a table (of columns)

(self, columns=None)

Source from the content-addressed store, hash-verified

54 self.validate_schema = validate_schema
55
56 def read_table(self, columns=None):
57 """
58 Read multiple feather files as a single pyarrow.Table
59
60 Parameters
61 ----------
62 columns : List[str]
63 Names of columns to read from the file
64
65 Returns
66 -------
67 pyarrow.Table
68 Content of the file as a table (of columns)
69 """
70 _fil = _read_table_internal(self.paths[0], columns=columns)
71 self._tables = [_fil]
72 self.schema = _fil.schema
73
74 for path in self.paths[1:]:
75 table = _read_table_internal(path, columns=columns)
76 if self.validate_schema:
77 self.validate_schemas(path, table)
78 self._tables.append(table)
79 return concat_tables(self._tables)
80
81 def validate_schemas(self, piece, table):
82 if not self.schema.equals(table.schema):

Calls 3

validate_schemasMethod · 0.95
_read_table_internalFunction · 0.85
appendMethod · 0.45