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

Function read_feather

python/pyarrow/feather.py:198–227  ·  view source on GitHub ↗

Read a pandas.DataFrame from Feather format. To read as pyarrow.Table use feather.read_table. Parameters ---------- source : str file path, or file-like object You can use MemoryMappedFile as source, for explicitly use memory map. columns : sequence, optional

(source, columns=None, use_threads=True,
                 memory_map=False, **kwargs)

Source from the content-addressed store, hash-verified

196
197
198def read_feather(source, columns=None, use_threads=True,
199 memory_map=False, **kwargs):
200 """
201 Read a pandas.DataFrame from Feather format. To read as pyarrow.Table use
202 feather.read_table.
203
204 Parameters
205 ----------
206 source : str file path, or file-like object
207 You can use MemoryMappedFile as source, for explicitly use memory map.
208 columns : sequence, optional
209 Only read a specific set of columns. If not provided, all columns are
210 read.
211 use_threads : bool, default True
212 Whether to parallelize reading using multiple threads. If false the
213 restriction is used in the conversion to Pandas as well as in the
214 reading from Feather format.
215 memory_map : boolean, default False
216 Use memory mapping when opening file on disk, when source is a str.
217 **kwargs
218 Additional keyword arguments passed on to `pyarrow.Table.to_pandas`.
219
220 Returns
221 -------
222 df : pandas.DataFrame
223 The contents of the Feather file as a pandas.DataFrame
224 """
225 return (read_table(
226 source, columns=columns, memory_map=memory_map,
227 use_threads=use_threads).to_pandas(use_threads=use_threads, **kwargs))
228
229
230def read_table(source, columns=None, memory_map=False, use_threads=True):

Callers 8

test_file_not_existFunction · 0.90
_check_pandas_roundtripFunction · 0.90
test_read_tableFunction · 0.90
test_use_threadsFunction · 0.90
test_filelike_objectsFunction · 0.90
TestTableClass · 0.85

Calls 1

read_tableFunction · 0.70

Tested by 7

test_file_not_existFunction · 0.72
_check_pandas_roundtripFunction · 0.72
test_read_tableFunction · 0.72
test_use_threadsFunction · 0.72
test_filelike_objectsFunction · 0.72