Ë
    Ìi
  ã                   ó>   — d dl mZ d dlmZmZmZmZ  G d„ de«      Zy)é    )ÚSeries)ÚDatumÚXÚYÚZc                   ó$   — e Zd ZdZdd„Zd„ Zd„ Zy)ÚCategorySeriesae  
    A series of categorized data and its associated metadata.

    Series object does not modify the data it is passed.

    :param data:
        A sequence (rows) of sequences (columns), a.k.a. :func:`csv.reader`
        format. If the :code:`x` and :code:`y` are not specified then the first
        column is used as the X values and the second column is used for Y.

        Or, a sequence of (rows) of dicts (columns), a.k.a.
        :class:`csv.DictReader` format. If this format is used then :code:`x`
        and :code:`y` arguments must specify the columns to be charted.

        Or, a custom data format, in which case :code:`x` and :code:`y` must
        specify :func:`.key_function`.
    :param x:
        If using sequence row data, then this may be either an integer index
        identifying the X column, or a :func:`.key_function`.

        If using dict row data, then this may be either a key name identifying
        the X column, or a :func:`.key_function`.

        If using a custom data format, then this must be a
        :func:`.key_function`.`
    :param y:
        See :code:`x`.
    :param z:
        See :code:`y`. This variable identifies the category/sub-series of each
        row.
    :param name:
        An optional name to be used in labeling this series. This will be
        used as the chart title if rendered in a :class:`.Lattice`.
    Nc                 óD  — || _         || _        | j                  |�|nt        «      | j                  |�|nt        «      | j                  |�|nt
        «      g| _        | j                  t        «      | j                  t        «      | j                  t
        «      g| _        y )N)	Ú_dataÚ_nameÚ	_make_keyr   r   r   Ú_keysÚ_infer_typeÚ_types)ÚselfÚdataÚxÚyÚzÚnames         úX/var/www/html/strategist-ai/venv/lib/python3.12/site-packages/leather/series/category.pyÚ__init__zCategorySeries.__init__(   s†   € ØˆŒ
ØˆŒ
ð �N‰N  ™1´1Ó5Ø�N‰N  ™1´1Ó5Ø�N‰N  ™1´1Ó5ð
ˆŒ
ð ×ÑœQÓØ×ÑœQÓØ×ÑœQÓð
ˆ�ó    c           
   #   ó  K  — | j                   t           }| j                   t           }| j                   t           }t	        | j
                  «      D ]+  \  }}t        | |||«       |||«       |||«      |«      –— Œ- y­w)zD
        Return data for this series grouped for rendering.
        N)r   r   r   r   Ú	enumerater   r   )r   r   r   r   ÚiÚrows         r   r   zCategorySeries.data8   sr   è ø€ ð �J‰J”q‰MˆØ�J‰J”q‰MˆØ�J‰J”q‰Mˆä §
¡
Ó+ò 	A‰FˆAˆsÜ˜™1˜S !›9¡a¨¨Q£i±°3¸³¸CÓ@Ó@ñ	Aùs   ‚A>B c                 ó¨   — | j                   t           }g }t        | j                  «      D ]$  \  }} |||«      }||vsŒ|j	                  |«       Œ& |S )zA
        Return all unique values in the category field.
        )r   r   r   r   Úappend)r   r   Ú
categoriesr   r   Úcats         r   r    zCategorySeries.categoriesC   s[   € ð �J‰J”q‰MˆØˆ
ä §
¡
Ó+ò 	'‰FˆAˆsÙ�C˜“)ˆCà˜*Ò$Ø×!Ñ! #Õ&ð		'ð Ðr   )NNNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r    © r   r   r	   r	      s   „ ñ!óD
ò 	Aór   r	   N)Úleather.series.baser   Úleather.utilsr   r   r   r   r	   r&   r   r   ú<module>r)      s   ðÝ &ß (Ó (ôK�Võ Kr   