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

Method read_table

python/pyarrow/feather.py:47–70  ·  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

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

Calls 3

validate_schemasMethod · 0.95
_read_table_internalFunction · 0.85
appendMethod · 0.45