+
    nDj&                         ^ RI Ht ^ RIt^ RIHt ^ RIHtHtHtH	t	 ^ RIH
t ^ RIHt ^ RIHt  ! R R4      tR	 t0 RmtRR
 ltRR ltRR ltR# )    )SequenceN)_pandas_api)CodecTableconcat_tablesschema)_feather)FeatherErrorc                   H   a  ] tR t^t o RtRR ltR	R ltR tR
R ltRt	V t
R# )FeatherDatasetz
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
c                    Wn         W n        R # N)pathsvalidate_schema)selfpath_or_pathsr   s   &&&I/data/cameron/venvs/s3viz/lib/python3.14/site-packages/pyarrow/feather.py__init__FeatherDataset.__init__*   s    "
.    Nc                b   \        V P                  ^ ,          VR7      pV.V n        VP                  V n        V P                  R,           FM  p\        W1R7      pV P                  '       d   V P                  W44       V P                  P                  V4       KO  	  \        V P                  4      # )z
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)
columns:   NN)
read_tabler   _tablesr   r   validate_schemasappendr   )r   r   _filpathtables   &&   r   r   FeatherDataset.read_table.   s     $**Q-9vkkJJrNNDt5E###%%d2LL&	 #
 T\\**r   c                    V P                   P                  VP                   4      '       g)   \        R V RV P                    RVP                    24      hR# )z
Schema in z was different. 
z

vs

N)r   equals
ValueError)r   piecer!   s   &&&r   r   FeatherDataset.validate_schemasG   sQ    {{!!%,,//z%0B $}Ju||nF G G 0r   c                F    V P                  VR7      P                  VR7      # )aA  
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   	to_pandas)r   r   r)   s   &&&r   read_pandasFeatherDataset.read_pandasL   s*      w/99# : % 	%r   )r   r   r   r   )Tr   )NT)__name__
__module____qualname____firstlineno____doc__r   r   r   r,   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s$     	/+2G
% %r   r   c                     VP                   ^8X  d   R# VP                  \        P                  ! 4       \        P                  ! 4       39   d   \        RV  R24      h\        RV  RVP                   R24      h)r   NzColumn 'zg' exceeds 2GB maximum capacity of a Feather binary column. This restriction may be lifted in the futurez
' of type zU was chunked on conversion to Arrow and cannot be currently written to Feather format)
num_chunkstypeextbinarystringr%   )namecols   &&r   check_chunked_overflowr>   `   sw    
~~
xxCJJL#**,//8D6 *0 0 1 	1
 tfJsxxj 1@ @
 	
r   c           	     D   \         P                  '       dQ   \         P                  '       d;   \        V \         P                  P
                  4      '       d   V P                  4       p \         P                  ! V 4      '       dz   V^8X  d   RpMV^8X  d   RpM\        R4      h\        P                  ! WR7      pV^8X  d<   \        VP                  P                  4       F  w  rWx,          p
\        W4       K  	  MT pV^8X  da   \        VP                   4      \        \#        VP                   4      4      8  d   \        R4      hVe   \        R4      hVe   \        R4      hMGVf    \$        P&                  ! R4      '       d   R	pM$Ve!   V\(        9  d   \        R
V R\(         24      h \*        P,                  ! WqVVWER7       R#   \.         dL    \        T\0        4      '       d4    \2        P4                  ! T4       h   \2        P6                   d     h i ; ih i ; i)aF  
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
FNz%Version value should either be 1 or 2)preserve_indexz'cannot serialize duplicate column namesz2Feather V1 files do not support compression optionz0Feather V1 files do not support chunksize option	lz4_framelz4zcompression="z " not supported, must be one of )compressioncompression_level	chunksizeversion)r   have_pandas
has_sparse
isinstancepdSparseDataFrameto_denseis_data_framer%   r   from_pandas	enumerater   namesr>   lencolumn_namessetr   is_available_FEATHER_SUPPORTED_CODECSr	   write_feather	Exceptionstrosremoveerror)dfdestrC   rD   rE   rF   r@   r!   ir<   r=   s   &&&&&&     r   rV   rV   s   s   2 """2{~~==>>B  $$ a<"N\!NDEE!!"Da<$U\\%7%78h&t1 9 !|u!!"SU-?-?)@%AAFGG" & ' '   & ' ' ! 5#5#5k#B#BK%!::}[M :''@&AC D D
u1B)2	E  dC  		$ 	 88 s0   -G	 	!H+HHHHHHc                B    \        WVVR7      P                  ! RRV/VB # )aN  
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
    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 used in the conversion to Pandas as well as in the
    reading from Feather format.
memory_map : boolean, default False
    Use memory mapping when opening file on disk, when source is a str.
**kwargs
    Additional keyword arguments passed on to `pyarrow.Table.to_pandas`.

Returns
-------
df : pandas.DataFrame
    The contents of the Feather file as a pandas.DataFrame
)r   
memory_mapr)   r)    r*   )sourcer   r)   r`   kwargss   &&&&,r   read_featherrd      s<    6 J!!*+ N7BNFLN Or   c                   \         P                  ! WVR7      pVf   VP                  4       # \        V\        4      '       g.   \        RP                  \        V4      P                  4      4      hV Uu. uF  p\        V4      NK  	  pp\        \        R V4      4      '       d   VP                  V4      pMY\        \        R V4      4      '       d   VP                  V4      pM+V Uu. uF  qP                  NK  	  p	p\        RV RV	 24      hVP                  ^8  d   V# \        \        V4      4      V8X  d   V# VP!                  V4      # u upi u upi )aO  
Read a pyarrow.Table from Feather format

Parameters
----------
source : str file path, or file-like object
    You can use MemoryMappedFile as source, for explicitly use memory map.
columns : sequence, optional
    Only read a specific set of columns. If not provided, all columns are
    read.
memory_map : boolean, default False
    Use memory mapping when opening file on disk, when source is a str
use_threads : bool, default True
    Whether to parallelize reading using multiple threads.

Returns
-------
table : pyarrow.Table
    The contents of the Feather file as a pyarrow.Table
)use_memory_mapr)   z&Columns must be a sequence but, got {}c                     V \         8H  # r   )intts   &r   <lambda>read_table.<locals>.<lambda>  s    cr   c                     V \         8H  # r   )rX   ri   s   &r   rk   rl     s    18r   z.Columns must be indices or names. Got columns z
 of types )r	   FeatherReaderreadrI   r   	TypeErrorformatr8   r.   allmapread_indices
read_namesrF   sortedrS   select)
rb   r   r`   r)   readercolumncolumn_typesr!   rj   column_type_namess
   &&&&      r   r   r      s@   * ##{DF {{}gx((@W 6 679 	9 077wVDLwL7
3!<011##G,	S#\2	3	3!!'*1=>AZZ> ''.iz:K9LN O 	O ~~	G		( ||G$$% 8 ?s   4E*E>   rB   zstduncompressed)NNN   )NTF)NFT)collections.abcr   rY   pyarrow.pandas_compatr   pyarrow.libr   r   r   r   libr9   pyarrowr	   pyarrow._featherr
   r   r>   rU   rV   rd   r   ra   r   r   <module>r      sN   & % 	 -0 0   )?% ?%D
  < PfO@1%r   