
    Q/Ph1                         d Z ddlmZ ddlmZ ddlmZmZ ddlZ	 ed          dee
d	f         fd
            Zedededed         fd            ZdS )z-Utility functions for (version) compatibility    )contextmanager)	lru_cache)	GeneratorTupleN   )maxsizereturn.c                  n    t          d t          j                            d          D                       S )zo
    Get the Pandas version as a tuple of integers,
    akin to `sys.version_info` for the Python version.
    c              3   4   K   | ]}t          |          V  d S )N)int).0ss     \/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/ydata_profiling/utils/compat.py	<genexpr>z&pandas_version_info.<locals>.<genexpr>   s(      ;;AQ;;;;;;    .)tuplepd__version__split r   r   pandas_version_infor   
   s1     ;;!5!5c!:!:;;;;;;r   
option_keyvalue)NNNc              #      K   	 t          j        | |          5  dV  ddd           dS # 1 swxY w Y   dS # t           j        j        $ r dV  Y dS w xY w)z
    A context manager that sets an option only if it is available in the
    current pandas version; otherwise, it is a no-op.
    N)r   option_contexterrorsOptionError)r   r   s     r   optional_option_contextr      s      z511 	 	EEE	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	9    s'   8 +8 /8 /8 AA)__doc__
contextlibr   	functoolsr   typingr   r   pandasr   r   r   strobjectr   r   r   r   <module>r'      s    3 3 % % % % % %       # # # # # # # #     1<U38_ < < < < "      r   