Skip to main content

No project description provided

Project description

category

Categorical transformation for data science

PyPI version Python version License PyPI Downloads

Installation

pip install works for this library.

pip install category

Single Category

>>> from category import Category
>>> book = Category(['a', 'b', 'c', 'Category_d', 'e', 'f', 'g', 'h', 'i', 'j'], pad_mst = False)
>>> book.i2c[2]
'c'

>>> book.c2i[['Category_d','f']]
array([3, 5])

You can set pad_mst to True to handle the missing token

>>> from category import Category
>>> book = Category(['a', 'b', 'c', 'Category_d', 'e', 'f', 'g', 'h', 'i', 'j'], pad_mst = True)
>>> book.i2c[2] # the 1st token is the missing token, not 'a' any more
'b'
>>> book.c2i[['Stranger','Category_d','Unknown','f']]
array([0, 4, 0, 6])

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

category-0.0.3.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

category-0.0.3-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file category-0.0.3.tar.gz.

File metadata

  • Download URL: category-0.0.3.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/58.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

File hashes

Hashes for category-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b7311c999713c72fe0af20c00b74a763d9d05e7de1ef398f28e9e8587784623e
MD5 6ae8ba31acc5128799b9aabcef1adc4e
BLAKE2b-256 4d92032a7a35fa811f432159ef906a8f730db26459bebc5e6a05f7b638d6360c

See more details on using hashes here.

File details

Details for the file category-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: category-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/58.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

File hashes

Hashes for category-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6a3be800f9c49e2ab20d133de558548b7f5f725306cfd7f2c0affafcfa8b6a49
MD5 55120da0a8ae44e30efb3f35b7460f30
BLAKE2b-256 43ddfbc4255af94dd9198ecb27b4a80f31f980f8554b5848e8b1037c4cb94535

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