/usr/local/lib64/python3.6/site-packages/pyarrow/__pycache__
NameSizeModeActions
benchmark.cpython-36.pyc2080644editdlrm
cffi.cpython-36.pyc14820644editdlrm
compat.cpython-36.pyc3810644editdlrm
compute.cpython-36.pyc202630644editdlrm
csv.cpython-36.pyc3820644editdlrm
cuda.cpython-36.pyc4050644editdlrm
dataset.cpython-36.pyc279700644editdlrm
feather.cpython-36.pyc77390644editdlrm
filesystem.cpython-36.pyc144020644editdlrm
flight.cpython-36.pyc13530644editdlrm
fs.cpython-36.pyc103950644editdlrm
hdfs.cpython-36.pyc70550644editdlrm
ipc.cpython-36.pyc73940644editdlrm
json.cpython-36.pyc2310644editdlrm
jvm.cpython-36.pyc80350644editdlrm
orc.cpython-36.pyc51400644editdlrm
pandas_compat.cpython-36.pyc276950644editdlrm
parquet.cpython-36.pyc666090644editdlrm
plasma.cpython-36.pyc40690644editdlrm
serialization.cpython-36.pyc137370644editdlrm
types.cpython-36.pyc120830644editdlrm
util.cpython-36.pyc41500644editdlrm
_generated_version.cpython-36.pyc2230644editdlrm
__init__.cpython-36.pyc164760644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/pyarrow/__pycache__/ipc.cpython-36.pyc (7394B)
3 8%Eg]@sddlZddlZddlmZmZmZmZmZm Z m Z m Z m Z m Z mZmZmZmZmZddljZGdddejZdZGdddejZGdd d ejZGd d d ejZd d ZdddddZdjee_ ddZ!dddddZ"djee"_ d ddZ#dddddZ$ddddZ%dS)!N)IpcWriteOptions ReadStats WriteStatsMessage MessageReaderRecordBatchReader_ReadPandasMixinMetadataVersion read_messageread_record_batch read_schema read_tensor write_tensorget_record_batch_sizeget_tensor_sizec@seZdZdZddZdS)RecordBatchStreamReaderz Reader for the Arrow streaming binary format. Parameters ---------- source : bytes/buffer-like, pyarrow.NativeFile, or file-like Python object Either an in-memory buffer, or a readable file object. cCs|j|dS)N)_open)selfsourcer7/usr/local/lib64/python3.6/site-packages/pyarrow/ipc.py__init__,sz RecordBatchStreamReader.__init__N)__name__ __module__ __qualname____doc__rrrrrr"sraNParameters ---------- sink : str, pyarrow.NativeFile, or file-like Python object Either a file path, or a writable file object. schema : pyarrow.Schema The Arrow schema for data to be written to the file. options : pyarrow.ipc.IpcWriteOptions Options for IPC serialization. If None, default values will be used: the legacy format will not be used unless overridden by setting the environment variable ARROW_PRE_0_15_IPC_FORMAT=1, and the V5 metadata version will be used unless overridden by setting the environment variable ARROW_PRE_1_0_METADATA_VERSION=1. use_legacy_format : bool, default None Deprecated in favor of setting options. Cannot be provided with options. If None, False will be used unless this default is overridden by setting the environment variable ARROW_PRE_0_15_IPC_FORMAT=1c@s&eZdZdjeZdddddZdS)RecordBatchStreamWriterz0Writer for the Arrow streaming binary format {}N)use_legacy_formatoptionscCst||}|j|||ddS)N)r)_get_legacy_format_defaultr)rsinkschemarrrrrrLs z RecordBatchStreamWriter.__init__)rrrformat_ipc_writer_class_docrrrrrrrGs rc@seZdZdZdddZdS)RecordBatchFileReadera Class for reading Arrow record batch data from the Arrow binary file format Parameters ---------- source : bytes/buffer-like, pyarrow.NativeFile, or file-like Python object Either an in-memory buffer, or a readable file object footer_offset : int, default None If the file is embedded in some larger file, this is the byte offset to the very end of the file data NcCs|j||ddS)N) footer_offset)r)rrr%rrrr^szRecordBatchFileReader.__init__)N)rrrrrrrrrr$Qs r$c@s&eZdZdjeZdddddZdS)RecordBatchFileWriterz1Writer to create the Arrow binary file format {}N)rrcCst||}|j|||ddS)N)r)rr)rr r!rrrrrrhs zRecordBatchFileWriter.__init__)rrrr"r#rrrrrrr&bs r&cCs|dk r|dk rtdn$|r>t|ts:tdjt||Stj}|dkrbtt t j j dd}tt t j j ddr~tj }t||dS)Nz8Can provide at most one of options and use_legacy_formatz expected IpcWriteOptions, got {}ZARROW_PRE_0_15_IPC_FORMAT0ZARROW_PRE_1_0_METADATA_VERSION)rmetadata_version) ValueError isinstancer TypeErrorr"typer ZV5boolintosenvirongetZV4)rrr(rrrrms  r)rrcCst||||dS)N)rr)r)r r!rrrrr new_streamsr2z7Create an Arrow columnar IPC stream writer instance {}cCst|S)a Create reader for Arrow streaming format. Parameters ---------- source : bytes/buffer-like, pyarrow.NativeFile, or file-like Python object Either an in-memory buffer, or a readable file object. Returns ------- reader : RecordBatchStreamReader )r)rrrr open_streams r3cCst||||dS)N)rr)r&)r r!rrrrrnew_filesr4z5Create an Arrow columnar IPC file writer instance {}cCs t||dS)a Create reader for Arrow file format. Parameters ---------- source : bytes/buffer-like, pyarrow.NativeFile, or file-like Python object Either an in-memory buffer, or a readable file object. footer_offset : int, default None If the file is embedded in some larger file, this is the byte offset to the very end of the file data. Returns ------- reader : RecordBatchFileReader )r%)r$)rr%rrr open_filesr5)nthreadspreserve_indexc CsFtjj|||d}tj}tj||j}|j|WdQRX|jS)a Serialize a pandas DataFrame into a buffer protocol compatible object. Parameters ---------- df : pandas.DataFrame nthreads : int, default None Number of threads to use for conversion to Arrow, default all CPUs. preserve_index : bool, default None The default of None will store the index as a column, except for RangeIndex which is stored as metadata only. If True, always preserve the pandas index data as a column. If False, no index information is saved and the result will have a default RangeIndex. Returns ------- buf : buffer An object compatible with the buffer protocol. )r6r7N)paZ RecordBatchZ from_pandasZBufferOutputStreamrr!Z write_batchgetvalue)dfr6r7batchr writerrrrserialize_pandass  r=T) use_threadsc Cs4tj|}tj|}|j}WdQRX|j|dS)aRDeserialize a buffer protocol compatible object into a pandas DataFrame. Parameters ---------- buf : buffer An object compatible with the buffer protocol. use_threads : bool, default True Whether to parallelize the conversion using multiple threads. Returns ------- df : pandas.DataFrame N)r>)r8Z BufferReaderrZread_allZ to_pandas)bufr>Z buffer_readerreadertablerrrdeserialize_pandass  rB)N)&r/Zpyarrowr8Z pyarrow.librrrrrrrr r r r r rrrlibZ_RecordBatchStreamReaderrr#Z_RecordBatchStreamWriterrZ_RecordBatchFileReaderr$Z_RecordBatchFileWriterr&rr2r"rr3r4r5r=rBrrrrs"D "