o
    g                     @  s  d dl mZ d dlmZmZ d dlmZ d dlZd dlmZ d dl	Z	d dl
Z
d dlmZmZmZ d dlZd dlZd dlm  mZ d dlmZ d dlmZmZ d d	lmZ d d
lmZ d dlmZm Z  dZ!G dd deZ"G dd dejZ#G dd de"Z$dddZ%dddZ&dS )    )annotations)abcdefaultdict)copyN)StringIO)DefaultDictIteratorcast)FilePathOrBuffer)EmptyDataErrorParserError)
is_integer)is_dict_like)
ParserBaseparser_defaultsu   ﻿c                   @  s   e Zd Zd9ddZdd Zd:dd	Zd
d Zd:ddZdd Zdd Z	d;ddZ
dd Zdd Zdd Zd d! Zd"d# Zd$d% Zd&d' Zd(d) Zd*d+ Zd,d- Zd.d/ Zd0d1 Zd2Zd3d4 Zd5d6 Zd:d7d8ZdS )<PythonParserfFilePathOrBuffer | listc           	   	     s*  t  | d _g  _d _d _|d  _t jr! j _n fdd _t	|d  _
|d  _|d  _t jtrEt j _|d	  _|d
  _|d  _|d  _|d  _|d  _|d phd _d _d|v rv|d  _|d  _|d  _t|d  _|d  _|d  _|d  _t|trtt t | _n/ !||  j"dusJ t# j"j$dsJ z	 % j"j$ W n t&j't(fy    )   w d _*z + \ _, _- _.W n t/t0fy    )   w t1 j,dkr 2 j, j3 j4\ _, _3 _4}t1 j, _-n j,d  _,t j, _5 j6s8 7 j,\} _5 _,d _8 j3du r8| _3 j*du rHtt9t1 j, _* : j, d} j;r\ < j* j,}| _=t1 jdkrkt0dt>? j} jdu r~d| d}nt>? j}d| d| d}t>@| _AdS ) zN
        Workhorse function for processing nested list into DataFrame
        Nr   skiprowsc                   s
   |  j v S N)r   )xself ]/home/ubuntu/cloudmapper/venv/lib/python3.10/site-packages/pandas/io/parsers/python_parser.py<lambda><   s   
 z'PythonParser.__init__.<locals>.<lambda>
skipfooter	delimiter	quotechar
escapechardoublequoteskipinitialspacelineterminatorquotingskip_blank_linesnamesFhas_index_namesverbose
convertersdtype	thousandsdecimalcommentreadline   Tz'Only length-1 decimal markers supportedz^[\-\+]?[0-9]*(z [0-9]*)?([0-9]?(E|e)\-?[0-9]+)?$z^[\-\+]?([0-9]+z	|[0-9])*()Br   __init__databufposline_posr   callableskipfunc_validate_skipfooter_argr   r   r   
isinstancestrr   r    r!   r"   r#   r$   names_passedr&   r'   r(   r   r)   r*   r+   r,   listr	   r   _open_handleshandleshasattrhandle_make_readercsvErrorUnicodeDecodeErrorclose_col_indices_infer_columnscolumnsnum_original_columnsunnamed_cols	TypeError
ValueErrorlen_extract_multi_indexer_columnsindex_names	col_names
orig_names_has_complex_date_col_get_index_name_name_processedrange_validate_parse_dates_presenceparse_dates_set_noconvert_dtype_columns_no_thousands_columnsreescapecompilenum)	r   r   kwds_rM   no_thousands_columnsr+   regexr*   r   r   r   r/   ,   s   

















	zPythonParser.__init__c           
        s@  j d u stdkrjrtdG fdddtj}|}d ur)|_ n_  }|ggd }j	s>|sZ j	d7  _	  }|ggd }j	s>|r>|d } j	d7  _	 j
d7  _
t |}|j |_ tjt||d}jt| tj |dd}n
 fd	d
}	|	 }|_d S )Nr.   z<Custom line terminators not supported in python parser (yet)c                      s4   e Zd Z jZ jZ jZ jZ jZ jZdZ	dS )z,PythonParser._make_reader.<locals>.MyDialect
N)
__name__
__module____qualname__r   r   r   r    r!   r#   r"   r   r   r   r   	MyDialect   s    rd   r   )dialectT)re   strictc                  3  sB       } t}||  V   D ]
} ||  V  qd S r   )r-   rX   rZ   splitstrip)linepat)r   sepr   r   _read   s   
z(PythonParser._make_reader.<locals>._read)r   rK   r"   rJ   r@   Dialectr-   _check_commentsr5   r2   r3   Sniffersniffreaderr   r1   extendr:   r0   )
r   r   rd   diari   linessniffedline_rdrrq   rl   r   )r   r   rk   r   r?      s8   		
zPythonParser._make_readerNc                 C  s  z|  |}W n ty   | jrg }n|    Y nw d| _t| j}t|sH| | j}| || j	| j
| j\}}}| || j}|||fS t|d }d }| jrc|t|krc|d }|dd  }| |}	| |	\}
}| ||
\}}
| |
}
| |
|	||\}}|||
fS )NFr   r.   )
_get_linesStopIteration_first_chunkrC   r:   rO   rK   _maybe_dedup_names_get_empty_meta	index_colrM   r)   _maybe_make_multi_index_columnsrN   count_empty_valsr&   _rows_to_cols_exclude_implicit_index_do_date_conversions_convert_data_make_index)r   rowscontentrF   r%   indexcol_dictcount_empty_content_valsindexnamerowalldatar0   r   r   r   read   s@   





zPythonParser.readc                   sR   |  | j}d| jrt| jt | |   fddt|D |fS )Nr   c                   s&   i | ]\}}|k r| |  qS r   r   ).0inamer   len_alldataoffsetr   r   
<dictcomp>+  s     z8PythonParser._exclude_implicit_index.<locals>.<dictcomp>)rz   rO   _implicit_indexrK   r|   _check_data_length	enumerate)r   r   r%   r   r   r   r      s   
z$PythonParser._exclude_implicit_indexc                 C  s   |d u r| j }| j|dS )N)r   )	chunksizer   )r   sizer   r   r   	get_chunk0  s   zPythonParser.get_chunkc           
        s    fdd}| j }t jts j}n| j}i }i }t jtrL jD ]#} j| } j| }	t|trB| jvrB j| }|||< |	||< q'n j} j} ||| j	||S )Nc                   s@   i }|   D ]\}}t|tr| jvr j| }|||< q|S )zconverts col numbers to names)itemsr7   intrO   )mappingcleancolvr   r   r   _clean_mapping8  s   

z2PythonParser._convert_data.<locals>._clean_mapping)
r(   r7   r)   dict	na_values
na_fvaluesr   rO   _convert_to_ndarraysr'   )
r   r0   r   
clean_convclean_dtypesclean_na_valuesclean_na_fvaluesr   na_value	na_fvaluer   r   r   r   6  s4   
	






zPythonParser._convert_datac                   sD  j  d}d}t }jd urj}t|tttjfr0t|dk}|r/t||d d g }nd}|g}g }t	|D ]n\}}z
 }	j|krS }	j|ksJW nZ ty }
 zNj|k rptd| djd  d|
|r|dkr|r|  |d gt|d   |||fW  Y d }
~
  S j std	|
j d d  }	W Y d }
~
nd }
~
ww g g }t	|	D ](\}}|d
kr|rd| d| }nd| }|| | q| q|sOjrOtt}t	D ]^\}}|}|| }|dkrC|dkr|d ||< | d| }|| }|dksjd urCtjrCj|d urCj|d u rCj|j|i ||< |d ||< qn?|r||d krt}j}|d urit|nd}t|}||kr{|| |ks|dkrd}d g| jd g_| |fdd|D  t|dkrt}q;|r   d urt t|d krtdt|dkrtdjd ur߈| | nt }jd urt tjkr fddtjD g}n g}n||d |}nz
 }	W n! ty6 }
 z s&td	|
 d d  }	W Y d }
~
nd }
~
ww t|	}|} sbj rQfddt!|D g}ntt!|g}||d |}n;jd u sot |kr| g |}t }n!t"jst tjkrtd g |  g}|}|||fS )Nr   Tr.   FzPassed header=z
 but only z lines in filezNo columns to parse from file z	Unnamed: _level_.c                   s   h | ]} | qS r   r   r   r   )this_columnsr   r   	<setcomp>      z.PythonParser._infer_columns.<locals>.<setcomp>zHNumber of passed names did not match number of header fields in the filez*Cannot pass names with multi-index columnsc                   s   g | ]} | qS r   r   r   )r%   r   r   
<listcomp>  r   z/PythonParser._infer_columns.<locals>.<listcomp>c                   s   g | ]	} j  | qS r   )prefixr   r   r   r   r     s    )#r%   setheaderr7   r:   tuplenpndarrayrK   r   _buffered_liner3   
_next_linerx   rJ   _clear_bufferappendr   mangle_dupe_colsr   r   r)   r   getupdater|   r1   rI   usecols_handle_usecolsrD   sortedr   rS   r4   )r   rG   clear_bufferrH   r   have_mi_columnsrF   levelhrri   errthis_unnamed_colsr   ccol_namecountsr   old_col	cur_countlcsicicunnamed_countncolsr   )r%   r   r   r   rE   c  s  








"






 
zPythonParser._infer_columnsrF   list[list[str | int | None]]usecols_keylist[str | int | None]rG   r   c              	     s   | j duryt| j r| | j | nYtdd | j D rTt|dkr&tdg  | j D ]'}t|trMz
 |	| W q+ tyL   | 
| j | Y q+w  | q+nfdd| j D }|rhtjdtd	d
 | j   fdd|D }t | _|S )zb
        Sets self._col_indices

        usecols_key is used if there are string usecols.
        Nc                 s  s    | ]}t |tV  qd S r   )r7   r8   )r   ur   r   r   	<genexpr>      z/PythonParser._handle_usecols.<locals>.<genexpr>r.   z4If using multiple headers, usecols must be integers.c                   s   g | ]}| kr|qS r   r   )r   r   )rG   r   r   r   .  s    z0PythonParser._handle_usecols.<locals>.<listcomp>zkDefining usecols with out of bounds indices is deprecated and will raise a ParserError in a future version.   )
stacklevelc                   s"   g | ]} fd dt |D qS )c                      g | ]
\}}| v r|qS r   r   )r   r   ncol_indicesr   r   r   ;      z;PythonParser._handle_usecols.<locals>.<listcomp>.<listcomp>)r   )r   columnr   r   r   r   :  s    )r   r4   _evaluate_usecolsanyrK   rJ   r7   r8   r   r   _validate_usecols_nameswarningswarnFutureWarningr   rD   )r   rF   r   rG   r   missing_usecolsr   )r   rG   r   r     sB   




	

zPythonParser._handle_usecolsc                 C  s    t | jdkr| jd S |  S )zH
        Return a line from buffer, filling buffer if required.
        r   )rK   r1   r   r   r   r   r   r   A  s   
zPythonParser._buffered_linec                 C  s   |s|S t |d ts|S |d s|S |d d }|tkr|S |d }t|dkrZ|d | jkrZd}|d }|dd |d }||| }t||d krY|||d d 7 }n|dd }|g|dd  S )a-  
        Checks whether the file begins with the BOM character.
        If it does, remove it. In addition, if there is quoting
        in the field subsequent to the BOM, remove it as well
        because it technically takes place at the beginning of
        the name, not the middle of it.
        r   r.      N)r7   r8   _BOMrK   r   r   )r   	first_row	first_eltfirst_row_bomstartquoteendnew_rowr   r   r   _check_for_bomJ  s(   
zPythonParser._check_for_bomc                 C  s   | pt dd |D S )z
        Check if a line is empty or not.

        Parameters
        ----------
        line : str, array-like
            The line of data to check.

        Returns
        -------
        boolean : Whether or not the line is empty.
        c                 s  s    | ]}| V  qd S r   r   r   r   r   r   r   r     s    z.PythonParser._is_line_empty.<locals>.<genexpr>)all)r   ri   r   r   r   _is_line_empty}  s   zPythonParser._is_line_emptyc                 C  s  t | jtr^| | jr|  jd7  _| | js	 z8| | j| j gd }|  jd7  _| js@| | j| jd  s>|r@W n| jrQ| |g}|rQ|d }W nW n	 t	y[   t
w qnV| | jr}|  jd7  _| jd usrJ t| j | | jsd	 | j| jd d}|  jd7  _|d ur| |gd }| jr| |g}|r|d }n
n| |s|rnq~| jdkr| |}|  jd7  _| j| |S )Nr.   Tr   row_num)r7   r0   r:   r5   r2   rn   r$   r   _remove_empty_lines
IndexErrorrx   next_next_iter_liner   r3   r1   r   )r   ri   ret	orig_liner   r   r   r     sb   


zPythonParser._next_linec                 C  sL   | j | jjkrt|| j | jjkr$d| d}tj|| d  dS dS )a  
        Alert a user about a malformed row, depending on value of
        `self.on_bad_lines` enum.

        If `self.on_bad_lines` is ERROR, the alert will be `ParserError`.
        If `self.on_bad_lines` is WARN, the alert will be printed out.

        Parameters
        ----------
        msg : The error message to display.
        row_num : The row number where the parsing error occurred.
                  Because this row number is displayed, we 1-index,
                  even though we 0-index internally.
        zSkipping line z: r`   N)on_bad_linesBadLineHandleMethodERRORr   WARNsysstderrwrite)r   msgr   baser   r   r   _alert_malformed  s   zPythonParser._alert_malformedc              
   C  s   z| j dusJ t| j W S  tjyP } z6| j| jjks$| j| jjkrEt|}d|v s0d|v r2d}| j	dkr?d}|d| 7 }| 
|| W Y d}~dS d}~ww )aL  
        Wrapper around iterating through `self.data` (CSV source).

        When a CSV error is raised, we check for specific
        error messages that allow us to customize the
        error message displayed to the user.

        Parameters
        ----------
        row_num : The row number of the line being parsed.
        Nz	NULL bytezline contains NULzNULL byte detected. This byte cannot be processed in Python's native csv library at the moment, so please pass in engine='c' insteadr   zError could possibly be due to parsing errors in the skipped footer rows (the skipfooter keyword is only applied after Python's csv library has parsed all rows).. )r0   r   r@   rA   r   r   r   r   r8   r   r  )r   r   er  reasonr   r   r   r     s$   
zPythonParser._next_iter_linec                 C  s   | j d u r|S g }|D ]8}g }|D ],}t|tr"| j |vs"|| jv r(|| q|d || j  }t|dkr=||  || q|S )Nr   )r,   r7   r8   r   r   findrK   )r   rt   r   ri   rlr   r   r   r   rn     s"   



zPythonParser._check_commentsc                 C  sN   g }|D ] }t |dkst |dkr$t|d tr|d  r$|| q|S )a}  
        Iterate through the lines and remove any that are
        either empty or contain only one whitespace value

        Parameters
        ----------
        lines : array-like
            The array of lines that we are to filter.

        Returns
        -------
        filtered_lines : array-like
            The same array of lines with the "empty" ones removed.
        r.   r   )rK   r7   r8   rh   r   )r   rt   r   ri   r   r   r   r     s   

z PythonParser._remove_empty_linesc                 C  s    | j d u r|S | j|| j ddS )Nr   rt   searchreplace)r*   _search_replace_num_columnsr   rt   r   r   r   _check_thousands2  s
   
zPythonParser._check_thousandsc           	      C  s   g }|D ]:}g }t |D ],\}}t|tr)||vs)| jr!|| jv s)| j| s/|| q|||| q|| q|S r   )	r   r7   r8   rW   r[   r  rh   r   r  )	r   rt   r  r  r   ri   r  r   r   r   r   r   r  :  s    
z(PythonParser._search_replace_num_columnsc                 C  s$   | j td kr	|S | j|| j ddS )Nr+   r   r  )r+   r   r  r  r   r   r   _check_decimalK  s
   zPythonParser._check_decimalc                 C  s
   g | _ d S r   )r1   r   r   r   r   r   S  s   
zPythonParser._clear_bufferFc           
      C  sF  t |}t |}z|  }W n ty   d}Y nw z|  }W n ty+   d}Y nw d}|dur{| j}|dur@t|| j }|dur{t|t|| j kr{t tt|| _| jdd | _t|D ]}|	d| qdt |}t|| _|||fS |dkrd| _
| jdu rt t|| _d}n| || j| j\}}	| _|||fS )a  
        Try several cases to get lines:

        0) There are headers on row 0 and row 1 and their
        total summed lengths equals the length of the next line.
        Treat row 0 as columns and row 1 as indices
        1) Look for implicit index: there are more columns
        on row 1 than row 0. If this is true, assume that row
        1 lists index columns and row 0 lists normal columns.
        2) Get index from the columns if it was listed.
        Nr   Fr.   T)r:   r   rx   r|   rK   rG   rS   r1   reversedinsertr   _clean_index_namesrH   )
r   rF   rO   ri   	next_lineimplicit_first_colsr|   r   
index_namecolumns_r   r   r   rQ   X  sF   




zPythonParser._get_index_namec                   s  j }jr|tj7 }tdd |D }||krjdurjd u rjr*jnd}g }t|}t|}g }|D ]9\}}	t|	}
|
|krnjj	j
ksTjj	jkrmj|| |  }|||
f jj	j
krm nq:||	 q:|D ]1\}}
d| d|d  d|
 }jrtjdkrjtjkrd	}|d
| 7 }||d  qvttj||dj}jrۈjd usJ j jrЇ fddt|D }|S  fddt|D }|S )Nc                 s  s    | ]}t |V  qd S r   )rK   r   rowr   r   r   r     s    z-PythonParser._rows_to_cols.<locals>.<genexpr>Fr   z	Expected z fields in line r.   z, saw zXError could possibly be due to quotes being ignored when a multi-char delimiter is used.r  )	min_widthc                   s4   g | ]\}}|t jk s|t j  v r|qS r   )rK   r|   r   r   ar   r   r   r   r     s    z.PythonParser._rows_to_cols.<locals>.<listcomp>c                   r   r   r   r  r   r   r   r     s    )rG   r   rK   r|   maxr   r   r   r   r   r   r   r2   r   r   r#   r@   
QUOTE_NONEr  r:   libto_object_arrayTrD   )r   r   col_lenmax_lenfooters	bad_linesiter_contentcontent_lenr   l
actual_lenr   r  r	  zipped_contentr   r  r   r     sb   


zPythonParser._rows_to_colsc                   s   j }d }|d ur(t j |kr! j d |  j |d  } _ n|t j 8 }|d u rt jtru jt jkr<t|d u rN j jd  }t j}n j j j|  } j| } jrl fddt|D }|	| | _nmg }z>|d urt
|D ]} jd usJ |t j q|	| nd}	  j j| d d}|d7 }|d ur|| qW n# ty    jrʇ fddt|D }|	| t|dkrւ Y nw   jt|7  _g  _ n|} jr|d  j  } |} jr |} |} |S )Nc                   $   g | ]\}}  | j s|qS r   r5   r2   r   r   r  r   r   r   r         z+PythonParser._get_lines.<locals>.<listcomp>r   Tr.   r   c                   r.  r   r/  r0  r   r   r   r   '  r1  )r1   rK   r7   r0   r:   r2   rx   r   r   rr   rS   r   r   r   r   rn   r$   r   r  r  )r   r   rt   new_rowsnew_posr]   r   r   r   r   rw     sp   "










zPythonParser._get_lines)r   r   r   )rF   r   r   r   rG   r   )ra   rb   rc   r/   r?   r   r   r   r   rE   r   r   r   r   r   r  r   rn   r   r  r  r  r   r   rQ   r   rw   r   r   r   r   r   +   s6    
 
B,
- 
.1	36,BSr   c                   @  s6   e Zd ZdZdddZdddZddd	Zd
d ZdS )FixedWidthReaderz(
    A reader of fixed-width lines.
    Nd   c                 C  s   || _ d | _|rd| nd| _|| _|dkr| j||d| _n|| _t| jttfs4t	dt
|j | jD ]-}t|ttfr`t|dkr`t|d ttjt
d fr`t|d ttjt
d fsdt	d	q7d S )
Nz
z
	 infer)infer_nrowsr   z;column specifications must be a list or tuple, input was a r   r   r.   zEEach column specification must be 2 element tuple or list of integers)r   bufferr   r,   detect_colspecscolspecsr7   r   r:   rI   typera   rK   r   r   integer)r   r   r:  r   r,   r   r7  colspecr   r   r   r/   D  s8   

zFixedWidthReader.__init__c                 C  sd   |du rt  }g }g }t| jD ]\}}||vr|| || t||kr* nqt|| _|S )a  
        Read rows from self.f, skipping as specified.

        We distinguish buffer_rows (the first <= infer_nrows
        lines) from the rows returned to detect_colspecs
        because it's simpler to leave the other locations
        with skiprows logic alone than to modify them to
        deal with the fact we skipped some rows here as
        well.

        Parameters
        ----------
        infer_nrows : int
            Number of rows to read from self.f, not counting
            rows that are skipped.
        skiprows: set, optional
            Indices of rows to skip.

        Returns
        -------
        detect_rows : list of str
            A list containing the rows to read.

        N)r   r   r   r   rK   iterr8  )r   r7  r   buffer_rowsdetect_rowsr   r  r   r   r   get_rowsb  s   


zFixedWidthReader.get_rowsc                   s   d dd  jD }td| d} ||}|s tdttt|}t	j
|d td} jd ur> fd	d
|D }|D ]}||D ]}	d||	 |	 < qGq@t	|d}
d|
d< t	||
A dkd }tt|d d d |dd d }|S )Nr   c                 s  s    | ]}d | V  qdS )\Nr   r   r   r   r   r     r   z3FixedWidthReader.detect_colspecs.<locals>.<genexpr>z([^z]+)z(No rows from which to infer column widthr.   )r)   c                   s   g | ]
}|  jd  qS )r   )	partitionr,   r  r   r   r   r     r   z4FixedWidthReader.detect_colspecs.<locals>.<listcomp>r   r   )joinr   rX   rZ   rA  r   r   maprK   r   zerosr   r,   finditerr   r   rollwherer:   zip)r   r7  r   
delimiterspatternr   r&  maskr  mshiftededges
edge_pairsr   r   r   r9    s$   
"z FixedWidthReader.detect_colspecsc                   s\   j d urztj  W n ty   d _ tj Y nw tj  fddjD S )Nc                   s$   g | ]\}} ||  jqS r   )rh   r   )r   frommtori   r   r   r   r     s   $ z-FixedWidthReader.__next__.<locals>.<listcomp>)r8  r   rx   r   r:  r   r   rT  r   __next__  s   

zFixedWidthReader.__next__)Nr5  r   )r5  N)ra   rb   rc   __doc__r/   rA  r9  rU  r   r   r   r   r4  ?  s    


&r4  c                   @  s*   e Zd ZdZdd Zdd Zddd	Zd
S )FixedWidthFieldParserzl
    Specialization that Converts fixed-width fields into DataFrames.
    See PythonParser for details.
    c                 K  s0   | d| _| d| _tj| |fi | d S )Nr:  r7  )popr:  r7  r   r/   )r   r   r\   r   r   r   r/     s   zFixedWidthFieldParser.__init__c                 C  s"   t || j| j| j| j| j| _d S r   )r4  r:  r   r,   r   r7  r0   )r   r   r   r   r   r?     s   
z"FixedWidthFieldParser._make_readerreturnr:   c                 C  s   dd |D S )z
        Returns the list of lines without the empty ones. With fixed-width
        fields, empty lines become arrays of empty strings.

        See PythonParser._remove_empty_lines.
        c                 S  s"   g | ]}t d d |D r|qS )c                 s  s$    | ]}t |t p| V  qd S r   )r7   r8   rh   )r   r  r   r   r   r        " zGFixedWidthFieldParser._remove_empty_lines.<locals>.<listcomp>.<genexpr>)r   )r   ri   r   r   r   r     s    z=FixedWidthFieldParser._remove_empty_lines.<locals>.<listcomp>r   r  r   r   r   r     s   z)FixedWidthFieldParser._remove_empty_linesN)rY  r:   )ra   rb   rc   rV  r/   r?   r   r   r   r   r   rW    s
    
rW  rY  r   c                 C  s   t dd | D S )Nc                 s  s$    | ]}|d ks|du rdV  qdS )r   Nr.   r   )r   r   r   r   r   r     rZ  z#count_empty_vals.<locals>.<genexpr>)sum)valsr   r   r   r~     s   r~   r   c                 C  s$   t | std| dk rtd| S )a  
    Validate the 'skipfooter' parameter.

    Checks whether 'skipfooter' is a non-negative integer.
    Raises a ValueError if that is not the case.

    Parameters
    ----------
    skipfooter : non-negative integer
        The number of rows to skip at the end of the file.

    Returns
    -------
    validated_skipfooter : non-negative integer
        The original input if the validation succeeds.

    Raises
    ------
    ValueError : 'skipfooter' was not a non-negative integer.
    zskipfooter must be an integerr   zskipfooter cannot be negative)r   rJ   )r   r   r   r   r6     s
   r6   )rY  r   )r   r   rY  r   )'
__future__r   collectionsr   r   r   r@   ior   rX   r  typingr   r   r	   r   numpyr   pandas._libs.lib_libsr"  pandas._typingr
   pandas.errorsr   r   pandas.core.dtypes.commonr   pandas.core.dtypes.inferencer   pandas.io.parsers.base_parserr   r   r   r   r4  rW  r~   r6   r   r   r   r   <module>   s<    	        j
$