Ë
    èlÖi  ã                   ó.   — d dl Z d dlmZ e	 	 dd„«       Zy)é    N)ÚStringIOc
                 ó  — ddl m} ddlm} d}	 t	        |d«      r|}nt        ||¬«      }d}t        |t        «      r!|dkD  r'|j                  «        |dz  }|dkD  rŒnt        d	«      ‚t        |j                  «       «      }|€1|j                  «       j                  |j                  «       «      |
d<   n8|dkD  r3|j                  «       j                  |j                  «       d
| «      |
d<    |j                  |fd|i|
¤Ž}|r|€t!        |«      }nt!        |«       |	€t#        |«      }nt#        t%        j&                  ||	«      «      }|r|j)                  «        	  |||||¬«      S # |rj)                  «        w w xY w)at  
    Create a new table from a CSV.

    This method uses agate's builtin CSV reader, which supplies encoding
    support for both Python 2 and Python 3.

    :code:`kwargs` will be passed through to the CSV reader.

    :param path:
        Filepath or file-like object from which to read CSV data. If a file-like
        object is specified, it must be seekable. If using Python 2, the file
        should be opened in binary mode (`rb`).
    :param column_names:
        See :meth:`.Table.__init__`.
    :param column_types:
        See :meth:`.Table.__init__`.
    :param row_names:
        See :meth:`.Table.__init__`.
    :param skip_lines:
        The number of lines to skip from the top of the file.
    :param header:
        If :code:`True`, the first row of the CSV is assumed to contain column
        names. If :code:`header` and :code:`column_names` are both specified
        then a row will be skipped, but :code:`column_names` will be used.
    :param sniff_limit:
        Limit CSV dialect sniffing to the specified number of bytes. Set to
        None to sniff the entire file. Defaults to 0 (no sniffing).
    :param encoding:
        Character encoding of the CSV file. Note: if passing in a file
        handle it is assumed you have already opened it with the correct
        encoding specified.
    :param row_limit:
        Limit how many rows of data will be read.
    r   )Úcsv)ÚTableFÚread)ÚencodingTé   z"skip_lines argument must be an intNÚdialectÚheader)Ú	row_names)Úagater   Úagate.tabler   ÚhasattrÚopenÚ
isinstanceÚintÚreadlineÚ
ValueErrorr   r   ÚSnifferÚsniffÚgetvalueÚreaderÚnextÚtupleÚ	itertoolsÚisliceÚclose)ÚclsÚpathÚcolumn_namesÚcolumn_typesr   Ú
skip_linesr   Úsniff_limitr   Ú	row_limitÚkwargsr   r   r   ÚfÚcontentsr   Úrowss                     úY/var/www/html/strategist-ai/venv_dbt/lib/python3.12/site-packages/agate/table/from_csv.pyÚfrom_csvr*      sh  € õJ Ý!à€Eð%Ü�4˜Ô Ø‰Aä�T HÔ-ˆAàˆEä�j¤#Ô&Ø˜q’.Ø—
‘
”Ø˜a‘�
ð ˜q”.ô ÐAÓBÐBä˜AŸF™F›HÓ%ˆàÐØ #§¡£× 3Ñ 3°H×4EÑ4EÓ4GÓ HˆF�9ÒØ˜1Š_Ø #§¡£× 3Ñ 3°H×4EÑ4EÓ4GÈÈÐ4UÓ VˆF�9Ñà�—‘˜HÑ>¨VÐ>°vÑ>ˆáØÐ#Ü# F›|‘ä�V”àÐÜ˜“=‰Däœ×)Ñ)¨&°)Ó<Ó=ˆDñ Ø�G‰G�Iá��| \¸YÔGÐGøñ Ø�G‰G�Ið ús   �AE* ÁC-E* Å*E?)NNNr   Tr   zutf-8N)r   Úior   Úclassmethodr*   © ó    r)   ú<module>r/      s)   ðÛ Ý ð ØuvØ)-òPHó ñPHr.   