:py:mod:`src.cleaning`
======================

.. py:module:: src.cleaning


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   src.cleaning.CleaningParam
   src.cleaning.Cleaning




.. py:class:: CleaningParam


   Bases: :py:obj:`pydantic.BaseModel`

   Define the threshold and the condition for Cleaning.

   Attributes:
       threshold   float
       keep    If it is "above", the condition will be the column grater equal than threshold. If it is "below", the condition will be the column less equal than threshold.

   .. py:attribute:: threshold
      :type: float

      

   .. py:attribute:: keep
      :type: Literal[above, below]

      


.. py:class:: Cleaning


   Bases: :py:obj:`pydantic.BaseModel`

   Query the data from agreements that match the conditions. Conditions are set by 
   initiating CleaningParam.

   Attributes:
       stats   a dictionary holds column name and CleaningParam object
       match   If it is "all", the Cleaning query the data that match all conditions. If it is "any", the queried data can only match one of the condition.

   .. py:attribute:: stats
      :type: dict[str, CleaningParam]

      

   .. py:attribute:: match
      :type: Literal[all, any]

      

   .. py:method:: __call__(agreements: pandas.DataFrame) -> pandas.DataFrame

      This object is callable.

      :param agreements: input dataframe
      :type agreements: DataFrame
      :return: output that match the conditions
      :rtype: DataFrame



