convertme

Simple dataset convertor in Python


Keywords
convertme, binnary, boolean, convertor, dataset, fca, python
License
MIT
Install
pip install convertme==0.1.2

Documentation

ConvertMe -- Ayoyoyo Wololo

https://img.shields.io/pypi/v/convertme https://img.shields.io/github/license/mikulatomas/convertme https://img.shields.io/pypi/pyversions/convertme

Simple dataset convertor in Python. Currently memory hungry in case of large datasets.

https://img.youtube.com/vi/Up2eawxvTmg/0.jpg

Installation

Install package via pip:

$ pip install convertme

Use the provided CLI:

$ convertme --help
Usage: convertme [OPTIONS]

Options:
-if, --input-format [csv|fimi|cxt|mat|cex]
                                [required]
-of, --output-format [csv|fimi|cxt|mat|cex]
                                [required]
-i, --input TEXT                Input file, skip it for stdin.
-o, --output TEXT               Output file, skip it for stdout.
--input-delimiter TEXT          (CSV) Delimiter of input.  [default: ,]
--output-delimiter TEXT         (CSV) Delimiter of output.  [default: ,]
--objects-col INTEGER           (CSV) Index of column with object labels,
                                typically 0, ignored on default.

--attributes-row INTEGER        (CSV) Index of row with attribute labels,
                                typically 0, ignored on default.

--true-values TEXT              (CSV) Values which will be count as True,
                                comma separated.

--help                          Show this message and exit.

Basic usage:

Convert simple csv file to fimi format:

$ convertme -i dataset.csv -if=csv -o dataset.fimi -of=fimi

Content of dataset.csv:

1,0,1,0
0,1,0,1

Content of dataset.fimi:

0 2
1 3

Supported formats

  • csv
  • burmeister (.cxt)
  • fimi
  • matlab (version<=7.3)
  • conexp (.cex)

Development

Clone this repository to the folder, then:

# create virtualenv (optional)
$ mkvirtualenv convertme -p python3

#if is not actived (optional)
$ workon convertme

$ pip install -e .

$ python setup.py test

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.