Package: pdpipe
Website:https://pdpipe.readthedocs.io/en/latest/Easy pipelines for pandas DataFrames (learn how!).>>>df=pd.DataFrame(data=[[4,165,'USA'],[2,180,'UK'],[2,170,'Greece']],index=['Dana','Jane','Nick'],columns=['Medals','Height','Born'])>>>importpdpipeaspdp>>>pipeline=pdp.ColDrop('Medals').OneHotEncode('Born')>>>pipeline(df)HeightBorn_UKBorn_USADana16501Jane18010Nick17000Contents1📚 Documentation2🔩 Installation3🎁 Contributing3.1🪛 Installing for development3.2⚗️ Running the tests3.3🔬 Adding tests3.4⚙️ Configuration3.5✒️ Code style3.6📓 Adding documentation3.7📋 Adding doctests4💳 Credits4.1🐞 Bugfixes & Documentation:1📚 DocumentationThis is the repository of thepdpipepackage, and this readme file is aimed to help potential contributors to the project.To learn more about how to usepdpipe, eithervisit pdpipe’s homepageor read thegetting started section.2🔩 InstallationInstallpdpipewith:pipinstallpdpipeSome pipeline stages requirescikit-learn; they will simply not be loaded ifscikit-learnis not found on the system, andpdpipewill issue a warning. To use them you must alsoinstall scikit-learn.Similarly, some pipeline stages requirenltk; they will simply not be loaded ifnltkis not found on your system, andpdpipewill issue a warning. To use them you must additionallyinstall nltk.3🎁 ContributingPackage author and current maintainer isShay Palachy(shay.palachy@gmail.com); You are more than welcome to approach him for help. Contributions are very welcomed, especially since this package is very much in its infancy and many other pipeline stages can be added.3.1🪛 Installing for developmentClone:gitclonegit@github.com:pdpipe/pdpipe.gitInstall in development mode with test dependencies:cdpdpipepipinstall-e".[test]"3.2⚗️ Running the testsTo run the tests, use:python-mpytestNoticepytestruns are configured by thepytest.inifile. Read it to understand the exactpytestarguments used.3.3🔬 Adding testsAt the time of writing,pdpipeis maintained with a test coverage of 100%. Although challenging, I hope to maintain this status. If you add code to the package, please make sure you thoroughly test it. Codecov automatically reports changes in coverage on each PR, and so PR reducing test coverage will not be examined before that is fixed.Tests reside under thetestsdirectory in the root of the repository. Each module has a separate test folder, with each class - usually a pipeline stage - having a dedicated file (always starting with the string “test”) containing several tests (each a global function starting with the string “test”). Please adhere to this structure, and try to separate tests cases to different test functions; this allows us to quickly focus on problem areas and use cases. Thank you! :)3.4⚙️ Configurationpdpipecan be configured using both a configuration file - locaated at either$XDG_CONFIG_HOME/pdpipe/cfg.jsonor, if theXDG_CONFIG_HOMEenvironment variable is not set, at~/.pdpipe/cfg.json- and environment variables.At the moment, these configuration options are only relevant for development. The available options are:LOAD_STAGE_ATTRIBUTES- True by default. If set to False stage attributes, which enable the chainer construction pattern, e.g.pdp.ColDrop('b').Bin('f'), are not loaded. This is used for sensible documentation generation. Set with this"LOAD_STAGE_ATTRIBUTES": falseincfg.json, or withexport PDPIPE__LOAD_STAGE_ATTRIBUTES=Falsefor environment variable-driven configuration.3.5✒️ Code stylepdpipcode is written to adhere to the coding style dictated byflake8. Practically, this means that one of the jobs that runs onthe project’s Travisfor each commit and pull request checks for a successfull run of theflake8CLI command in the repository’s root. Which means pull requests will be flagged red by the Travis bot if non-flake8-compliant code was added.To solve this, please runflake8on your code (whether through your text editor/IDE or using the command line) and fix all resulting errors. Thank you! :)3.6📓 Adding documentationThis project is documented using thenumpy docstring conventions, which were chosen as they are perhaps the most widely-spread conventions that are both supported by common tools such as Sphinx and result in human-readable docstrings (in my personal opinion, of course). When documenting code you add to this project, please followthese conventions.Additionally, if you update thisREADME.rstfile,  usepython setup.py checkdocsto validate it compiles.3.7📋 Adding doctestsDoctests can be added in the traditional manner:classApplyByCols(PdPipelineStage):"""A pipeline stage applying an element-wise function to columns.

    Parameters
    ----------
    columns : str or list-like
        Names of columns on which to apply the given function.
    func : function
        The function to be applied to each element of the given columns.
    result_columns : str or list-like, default None
        The names of the new columns resulting from the mapping operation. Must
        be of the same length as columns. If None, behavior depends on the
        drop parameter: If drop is True, the name of the source column is used;
        otherwise, the name of the source column is used with the suffix
        '_app'.
    drop : bool, default True
        If set to True, source columns are dropped after being mapped.
    func_desc : str, default None
        A function description of the given function; e.g. 'normalizing revenue
        by company size'. A default description is used if None is given.


    Example
    -------
    >>> import pandas as pd; import pdpipe as pdp; import math;
    >>> data = [[3.2, "acd"], [7.2, "alk"], [12.1, "alk"]]
    >>> df = pd.DataFrame(data, [1,2,3], ["ph","lbl"])
    >>> round_ph = pdp.ApplyByCols("ph", math.ceil)
    >>> round_ph(df)
       ph  lbl
    1   4  acd
    2   8  alk
    3  13  alk
    """4💳 CreditsCreated byShay Palachy(shay.palachy@gmail.com).4.1🐞 Bugfixes & Documentation:@carbonleakage@yarkhinephyo@Silun@naveenkaushik2504