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

Method _select_names

python/pyarrow/orc.py:130–148  ·  view source on GitHub ↗
(self, columns=None)

Source from the content-addressed store, hash-verified

128 return self.reader.file_length()
129
130 def _select_names(self, columns=None):
131 if columns is None:
132 return None
133
134 schema = self.schema
135 names = []
136 for col in columns:
137 if isinstance(col, Integral):
138 col = int(col)
139 if 0 <= col < len(schema):
140 col = schema[col].name
141 names.append(col)
142 else:
143 raise ValueError("Column indices must be in 0 <= ind < %d,"
144 " got %d" % (len(schema), col))
145 else:
146 return columns
147
148 return names
149
150 def read_stripe(self, n, columns=None):
151 """Read a single stripe from the file.

Callers 2

read_stripeMethod · 0.95
readMethod · 0.95

Calls 2

lenFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected