Sindbad~EG File Manager
�
Mٜgz� � �� � d Z ddlmZ ddlmZ ddlZddlZddlmZ ddlm Z m
Z
mZ ddlZddl
mZ ddlmZ dd lmZmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZ ddlmZ ddl m!Z! ddl"m#Z# ddl$m%Z% ddl&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z- ddl.m/Z/ ddl0m1Z1 e rddl2m3Z3m4Z4 ddl5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z; ddlm<Z< ejz d� Z>e>fd6d�Z?d7d�Z@ d8d�ZA G d� d� ZB G d � d!eB� ZCd9d"�ZDd#d$iZE G d%� d&eB� ZFd:d'�ZGd(� ZHeFeFeCeCd)�ZId;d*�ZJd9d+�ZKd,� ZLd-� ZM ee%d �.� d/dddddd0d1dd2ddd3d3dej� dd4� d<d5�� ZOy)=zW
:mod:`pandas.io.html` is a module containing functionality for dealing with
HTML IO.
� )�annotations)�abcN)�Pattern)�
TYPE_CHECKING�Literal�cast)�lib)�import_optional_dependency)�AbstractMethodError�EmptyDataError)�doc)�find_stack_level)�check_dtype_backend)�is_list_like��isna)�Index)�
MultiIndex)�Series)�_shared_docs)�file_exists�
get_handle�is_file_like�
is_fsspec_url�is_url�stringify_path�validate_header_arg)�pprint_thing)�
TextParser)�Iterable�Sequence)�
BaseBuffer�DtypeBackend�FilePath�HTMLFlavors�
ReadBuffer�StorageOptions)� DataFramez[\r\n]+|\s{2,}c �B � |j d| j � � S )a�
Replace extra whitespace inside of a string with a single space.
Parameters
----------
s : str or unicode
The string from which to remove extra whitespace.
regex : re.Pattern
The regular expression to use to remove extra whitespace.
Returns
-------
subd : str or unicode
`s` with all extra whitespace replaced with a single space.
� )�sub�strip)�s�regexs �9/usr/local/lib/python3.12/site-packages/pandas/io/html.py�_remove_whitespacer0 I s � � �9�9�S�!�'�'�)�$�$� c �L � t | t � r@| j xs d| j xs d}}t t || j |� � S t | t j � st | � rt d| � S | �yt t | � j � d�� �)a�
Get an iterator given an integer, slice or container.
Parameters
----------
skiprows : int, slice, container
The iterator to use to skip rows; can also be a slice.
Raises
------
TypeError
* If `skiprows` is not a slice, integer, or Container
Returns
-------
it : iterable
A proper iterator to use to skip rows of a DataFrame.
r � �int | Sequence[int]z& is not a valid type for skipping rows)�
isinstance�slice�start�step�list�range�stop�numbers�Integralr r � TypeError�type�__name__)�skiprowsr7 r8 s r/ �
_get_skiprowsrB \ s� � �&