Python package df2onehot is to convert a pandas dataframe into a stuctured dataframe.
Project description
df2onehot
- df2onehot is Python package
Contents
Installation
- Install df2onehot from PyPI (recommended). df2onehot is compatible with Python 3.6+ and runs on Linux, MacOS X and Windows.
- It is distributed under the MIT license.
Quick Start
pip install df2onehot
- Alternatively, install df2onehot from the GitHub source:
git clone https://github.com/erdogant/df2onehot.git
cd df2onehot
python -U setup.py install
Import df2onehot package
import df2onehot
Example:
df = df2onehot.import_example()
# Convert
out = df2onehot.df2onehot(df)
# Force features (int or float) to be numeric if unique non-zero values are above percentage.
out = df2onehot.df2onehot(df, perc_min_num=0.8)
# Remove categorical features for which less then 2 values exists.
out = df2onehot.df2onehot(df, y_min=2)
# Combine two rules above.
out = df2onehot.df2onehot(df, y_min=2, perc_min_num=0.8)
Maintainers
- Erdogan Taskesen, github: erdogant
Contribute
- Contributions are welcome.
Licence
See LICENSE for details.
Donation
- This work is created and maintained in my free time. If you wish to buy me a Coffee for this work, it is very appreciated.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
df2onehot-0.1.1.tar.gz
(32.2 kB
view details)
Built Distribution
df2onehot-0.1.1-py3-none-any.whl
(32.3 kB
view details)
File details
Details for the file df2onehot-0.1.1.tar.gz
.
File metadata
- Download URL: df2onehot-0.1.1.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3673724eb2879e4c96ae86441c59110f2468553d85c8fd4992f996f4399c38e |
|
MD5 | f8bd1b9072d289f9754bae466135b93b |
|
BLAKE2b-256 | b20323e175d73e5512c865162158811dfa964d93412a8199306d0de5bcc928a4 |
File details
Details for the file df2onehot-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: df2onehot-0.1.1-py3-none-any.whl
- Upload date:
- Size: 32.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6607116633769b4882a8dd33c0448aa08d827c423a5dc69ef2bbd95684e385a2 |
|
MD5 | b27fe3b518d6226132a1704072819910 |
|
BLAKE2b-256 | 4ca5407df4addbe0c34dabdf90671902856a6b0207e9667fa3bbf3212e8f78f6 |