/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__/feather.cpython-36.pyc (7739B)
3 9%Eg*$@sddlZddlmZddlmZmZmZmZddljZ ddl m Z ddl m Z ddlmZddZGd d d Zd d Zd ddhZdddZdddZdddZdS)N) _pandas_api)CodecTable concat_tablesschema)_feather) FeatherError)VersioncCstjtdkrtddS)Nz0.17.0z!feather requires pandas >= 0.17.0)rZ loose_versionr ImportErrorr r ;/usr/local/lib64/python3.6/site-packages/pyarrow/feather.py_check_pandas_versionsr c@s6eZdZdZd ddZd ddZdd Zdd d ZdS)FeatherDataseta Encapsulates details of reading a list of Feather files. Parameters ---------- path_or_paths : List[str] A list of file names validate_schema : bool, default True Check that individual file schemas are all the same / compatible TcCs||_||_dS)N)pathsvalidate_schema)selfZ path_or_pathsrr r r __init__/szFeatherDataset.__init__NcCsnt|jd|d}|g|_|j|_x@|jddD].}t||d}|jrT|j|||jj|q2Wt|jS)a, 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) r)columnsN) read_tablerZ_tablesrrvalidate_schemasappendr)rrZ_filpathtabler r r r3s  zFeatherDataset.read_tablecCs(|jj|js$tdj||j|jdS)Nz-Schema in {!s} was different. {!s} vs {!s})requals ValueErrorformat)rZpiecerr r r rLszFeatherDataset.validate_schemascCst|j|dj|dS)a Read multiple Parquet files as a single pandas DataFrame Parameters ---------- columns : List[str] Names of columns to read from the file use_threads : bool, default True Use multiple threads when converting to pandas Returns ------- pandas.DataFrame Content of the file as a pandas DataFrame (of columns) )r) use_threads)r r to_pandas)rrrr r r read_pandasSs zFeatherDataset.read_pandas)T)N)NT)__name__ __module__ __qualname____doc__rrrrr r r r r#s    rcCsN|jdkrdS|jtjtjfkr4tdj|ntdj|t|jdS)NrzqColumn '{}' exceeds 2GB maximum capacity of a Feather binary column. This restriction may be lifted in the futurezkColumn '{}' of type {} was chunked on conversion to Arrow and cannot be currently written to Feather format)Z num_chunkstypeextbinarystringrrstr)namecolr r r check_chunked_overflowhs  r+lz4ZzstdZ uncompressedc Cshtjr(ttjr(t|tjjr(|j}tj|rvt j |dd}|dkrzx0t |j j D]\}}||} t|| qVWn|}|dkrt|jtt|jkrtd|dk rtd|dk rtdn8|dkrtjdrd }n |dk r|tkrtd j|tytj||||||d WnLtk rbt|tr\ytj|Wntjk rZYnXYnXdS) a Write a pandas.DataFrame to Feather format. Parameters ---------- df : pandas.DataFrame or pyarrow.Table Data to write out as Feather format. dest : str Local destination path. compression : string, default None Can be one of {"zstd", "lz4", "uncompressed"}. The default of None uses LZ4 for V2 files if it is available, otherwise uncompressed. compression_level : int, default None Use a compression level particular to the chosen compressor. If None use the default compression level chunksize : int, default None For V2 files, the internal maximum size of Arrow RecordBatch chunks when writing the Arrow IPC file format. None means use the default, which is currently 64K version : int, default 2 Feather file version. Version 2 is the current. Version 1 is the more limited legacy format F)Zpreserve_indexrz'cannot serialize duplicate column namesNz2Feather V1 files do not support compression optionz0Feather V1 files do not support chunksize optionZ lz4_framer,z1compression="{}" not supported, must be one of {}) compressioncompression_level chunksizeversion)rZ have_pandasr Z has_sparse isinstancepdZSparseDataFrameZto_denseZ is_data_framerZ from_pandas enumeraternamesr+lenZ column_namessetrrZ is_available_FEATHER_SUPPORTED_CODECSrr write_feather Exceptionr(osremoveerror) dfdestr.r/r0r1rir)r*r r r r9zsJ    r9TcCstt|||dj|dS)a 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 columns : sequence, optional Only read a specific set of columns. If not provided, all columns are read. use_threads : bool, default True Whether to parallelize reading using multiple threads. If false the restriction is only used in the conversion to Pandas and not in the reading from Feather format. memory_map : boolean, default True Use memory mapping when opening file on disk Returns ------- df : pandas.DataFrame )r memory_map)r)r rr)sourcerrrAr r r read_feathersrCcCstj||d}|dkr|jSdd|D}ttdd|rJ|j|}nszread_table..cSs|tkS)N)int)tr r r szread_table..cSs|tkS)N)r()rHr r r rIscSsg|] }|jqSr )r )rDrHr r r rFszs     E  J