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

Method read_table

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

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

Calls 3

validate_schemasMethod · 0.95
read_tableFunction · 0.70
appendMethod · 0.45