Skip to main content

Python package df2onehot is to convert a pandas dataframe into a stuctured dataframe.

Project description

df2onehot

Python PyPI Version License Downloads Downloads Coffee

Star it if you like it!
  • df2onehot is Python package to convert your complex dataframe into a one-hot dense array.

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
  • Contributions are welcome.
  • If you wish to buy me a Coffee for this work, it is very appreciated :)

Project details


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.6.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

df2onehot-0.1.6-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file df2onehot-0.1.6.tar.gz.

File metadata

  • Download URL: df2onehot-0.1.6.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.10

File hashes

Hashes for df2onehot-0.1.6.tar.gz
Algorithm Hash digest
SHA256 f9ceec6376880c324c051fec2751273ab2374c4ec7b83c334f061fe67b8c7980
MD5 70529c5dd1efc7ec3e845d5f26fc50f7
BLAKE2b-256 1085795b9ee47be10d57a1774830fd2f3bdc25a55131a9a277cacbf4d4907d49

See more details on using hashes here.

File details

Details for the file df2onehot-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: df2onehot-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.10

File hashes

Hashes for df2onehot-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 81b373106942f6bd609dee93cb71337cbbab490184bfbd6584a2378e709956be
MD5 5ad88629254f9f18d3e742926bbb267b
BLAKE2b-256 0575001ae6fa3f86d6147d07ec7d2d11fecf68a66b99e1cbd4e8e383ed75557f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page