df2onehot


Namedf2onehot JSON
Version 1.0.8 PyPI version JSON
download
home_pagehttps://erdogant.github.io/df2onehot
SummaryPython package df2onehot is to convert a pandas dataframe into a stuctured dataframe.
upload_time2025-01-17 08:51:29
maintainerNone
docs_urlNone
authorErdogan Taskesen
requires_python>=3
licenseNone
keywords
VCS
bugtrack_url
requirements numpy pandas scikit-learn tqdm datazets packaging
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # df2onehot

[![Python](https://img.shields.io/pypi/pyversions/df2onehot)](https://img.shields.io/pypi/pyversions/df2onehot)
[![PyPI Version](https://img.shields.io/pypi/v/df2onehot)](https://pypi.org/project/df2onehot/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/erdogant/df2onehot/blob/master/LICENSE)
[![Downloads](https://pepy.tech/badge/df2onehot/month)](https://pepy.tech/project/df2onehot/month)
[![Downloads](https://pepy.tech/badge/df2onehot)](https://pepy.tech/project/df2onehot)
[![DOI](https://zenodo.org/badge/245003302.svg)](https://zenodo.org/badge/latestdoi/245003302)
[![Sphinx](https://img.shields.io/badge/Sphinx-Docs-Green)](https://erdogant.github.io/df2onehot/)
<!---[![BuyMeCoffee](https://img.shields.io/badge/buymea-coffee-yellow.svg)](https://www.buymeacoffee.com/erdogant)-->
<!---[![Coffee](https://img.shields.io/badge/coffee-black-grey.svg)](https://erdogant.github.io/donate/?currency=USD&amount=5)-->

``df2onehot`` is a Python package to convert unstructured DataFrames into structured dataframes, such as one-hot dense arrays.

# 
**⭐️ Star this repo if you like it ⭐️**
#

#### Install df2onehot from PyPI

```bash
pip install df2onehot
```

#### Import df2onehot package

```python
from df2onehot import df2onehot
```
# 


### [Documentation pages](https://erdogant.github.io/df2onehot/)

On the [documentation pages](https://erdogant.github.io/df2onehot/) you can find detailed information about the working of the ``df2onehot`` with many examples. 

<hr> 

### Examples

```python
results = df2onehot(df)
```

```python
# Force features (int or float) to be numeric if unique non-zero values are above percentage.
out = df2onehot(df, perc_min_num=0.8)
```

```python
# Remove categorical features for which less then 2 values exists.
out = df2onehot(df, y_min=2)
```

```python
# Combine two rules above.
out = df2onehot(df, y_min=2, perc_min_num=0.8)
```


# 
* [Example: Process Mixed dataset](https://erdogant.github.io/df2onehot/pages/html/Examples.html#)
# 
* [Example: Extracting nested columns](https://erdogant.github.io/df2onehot/pages/html/Examples.html#extracting-nested-columns)
# 
* [Example: Setting custom dtypes](https://erdogant.github.io/df2onehot/pages/html/Examples.html#custom-dtypes)
#

<hr>

#### Maintainers
* Erdogan Taskesen, github: [erdogant](https://github.com/erdogant)
* Contributions are welcome.
* If you wish to buy me a <a href="https://www.buymeacoffee.com/erdogant">Coffee</a> for this work, it is very appreciated :)

            

Raw data

            {
    "_id": null,
    "home_page": "https://erdogant.github.io/df2onehot",
    "name": "df2onehot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": null,
    "keywords": null,
    "author": "Erdogan Taskesen",
    "author_email": "erdogant@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/28/33/9f346374ee2b5a97b6d30be90564a9df985b3ae00b95239118d222c1b823/df2onehot-1.0.8.tar.gz",
    "platform": null,
    "description": "# df2onehot\r\n\r\n[![Python](https://img.shields.io/pypi/pyversions/df2onehot)](https://img.shields.io/pypi/pyversions/df2onehot)\r\n[![PyPI Version](https://img.shields.io/pypi/v/df2onehot)](https://pypi.org/project/df2onehot/)\r\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/erdogant/df2onehot/blob/master/LICENSE)\r\n[![Downloads](https://pepy.tech/badge/df2onehot/month)](https://pepy.tech/project/df2onehot/month)\r\n[![Downloads](https://pepy.tech/badge/df2onehot)](https://pepy.tech/project/df2onehot)\r\n[![DOI](https://zenodo.org/badge/245003302.svg)](https://zenodo.org/badge/latestdoi/245003302)\r\n[![Sphinx](https://img.shields.io/badge/Sphinx-Docs-Green)](https://erdogant.github.io/df2onehot/)\r\n<!---[![BuyMeCoffee](https://img.shields.io/badge/buymea-coffee-yellow.svg)](https://www.buymeacoffee.com/erdogant)-->\r\n<!---[![Coffee](https://img.shields.io/badge/coffee-black-grey.svg)](https://erdogant.github.io/donate/?currency=USD&amount=5)-->\r\n\r\n``df2onehot`` is a Python package to convert unstructured DataFrames into structured dataframes, such as one-hot dense arrays.\r\n\r\n# \r\n**\u2b50\ufe0f Star this repo if you like it \u2b50\ufe0f**\r\n#\r\n\r\n#### Install df2onehot from PyPI\r\n\r\n```bash\r\npip install df2onehot\r\n```\r\n\r\n#### Import df2onehot package\r\n\r\n```python\r\nfrom df2onehot import df2onehot\r\n```\r\n# \r\n\r\n\r\n### [Documentation pages](https://erdogant.github.io/df2onehot/)\r\n\r\nOn the [documentation pages](https://erdogant.github.io/df2onehot/) you can find detailed information about the working of the ``df2onehot`` with many examples. \r\n\r\n<hr> \r\n\r\n### Examples\r\n\r\n```python\r\nresults = df2onehot(df)\r\n```\r\n\r\n```python\r\n# Force features (int or float) to be numeric if unique non-zero values are above percentage.\r\nout = df2onehot(df, perc_min_num=0.8)\r\n```\r\n\r\n```python\r\n# Remove categorical features for which less then 2 values exists.\r\nout = df2onehot(df, y_min=2)\r\n```\r\n\r\n```python\r\n# Combine two rules above.\r\nout = df2onehot(df, y_min=2, perc_min_num=0.8)\r\n```\r\n\r\n\r\n# \r\n* [Example: Process Mixed dataset](https://erdogant.github.io/df2onehot/pages/html/Examples.html#)\r\n# \r\n* [Example: Extracting nested columns](https://erdogant.github.io/df2onehot/pages/html/Examples.html#extracting-nested-columns)\r\n# \r\n* [Example: Setting custom dtypes](https://erdogant.github.io/df2onehot/pages/html/Examples.html#custom-dtypes)\r\n#\r\n\r\n<hr>\r\n\r\n#### Maintainers\r\n* Erdogan Taskesen, github: [erdogant](https://github.com/erdogant)\r\n* Contributions are welcome.\r\n* If you wish to buy me a <a href=\"https://www.buymeacoffee.com/erdogant\">Coffee</a> for this work, it is very appreciated :)\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python package df2onehot is to convert a pandas dataframe into a stuctured dataframe.",
    "version": "1.0.8",
    "project_urls": {
        "Download": "https://github.com/erdogant/df2onehot/archive/1.0.8.tar.gz",
        "Homepage": "https://erdogant.github.io/df2onehot"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8759102bc029e1b633e813de17c4a3c8f4bca1e1290489efba10f4a86897c30d",
                "md5": "becdef4782e8c96e1cf4504eff489d4a",
                "sha256": "3a4686479adb66b29b94ea53b2684dea654bcd0203c18797b3a2ae1bedd79d84"
            },
            "downloads": -1,
            "filename": "df2onehot-1.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "becdef4782e8c96e1cf4504eff489d4a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 15007,
            "upload_time": "2025-01-17T08:51:27",
            "upload_time_iso_8601": "2025-01-17T08:51:27.121500Z",
            "url": "https://files.pythonhosted.org/packages/87/59/102bc029e1b633e813de17c4a3c8f4bca1e1290489efba10f4a86897c30d/df2onehot-1.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "28339f346374ee2b5a97b6d30be90564a9df985b3ae00b95239118d222c1b823",
                "md5": "cef6d8ef5ec781e16bacb49581247407",
                "sha256": "a14c1ee953d86149af4368302e03aa2037c96f683fbe699e5fa6854f6a1c99af"
            },
            "downloads": -1,
            "filename": "df2onehot-1.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "cef6d8ef5ec781e16bacb49581247407",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 14264,
            "upload_time": "2025-01-17T08:51:29",
            "upload_time_iso_8601": "2025-01-17T08:51:29.426767Z",
            "url": "https://files.pythonhosted.org/packages/28/33/9f346374ee2b5a97b6d30be90564a9df985b3ae00b95239118d222c1b823/df2onehot-1.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-17 08:51:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "erdogant",
    "github_project": "df2onehot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "scikit-learn",
            "specs": []
        },
        {
            "name": "tqdm",
            "specs": []
        },
        {
            "name": "datazets",
            "specs": []
        },
        {
            "name": "packaging",
            "specs": []
        }
    ],
    "lcname": "df2onehot"
}
        
Elapsed time: 1.25612s