# shapeshifter Python Module
The official repository for the shapeshifter Python module, which allows for:
* Transforming tabular data sets from one format to another.
* Querying large data sets to filter out useful data.
* Selecting additional columns/features to include in the resulting data set.
* Merging data sets of various formats into a single file.
* Gzipping resulting data sets, as well as the ability to read gzipped files.
Click for information on the [shapeshifter command-line tool](https://github.com/srp33/ShapeShifter-CLI), which combines
the features of shapeshifter with the ease and speed of the command-line!
Basic use is described below, but see the full documentation on [Read the Docs](https://shapeshifter.readthedocs.io/en/latest/).
## Install
`pip3 install shapeshifter`
## Basic Use
After installing, import the ShapeShifter class with `from shapeshifter import ShapeShifter`. A ShapeShifter object
represents the file to be transformed. It is then transformed using the `export_filter_results` method. Here is a simple
example of file called `input_file.tsv` being transformed into an HDF5 file called `output_file.h5`, while filtering
the data on sex and age:
```python
from shapeshifter import ShapeShifter
my_shapeshifter = ShapeShifter("input_file.tsv")
my_shapeshifter.export_filter_results("output_file.h5", filters="Sex == 'M' and Age > 40")
```
Note that the type of file being read and exported to were not stated explicitly but inferred by shapeshifter based on
the file extensions provided. If necessary, `input_file_type` and `output_file_type` can be named explicitly.
## Contributing
We welcome contributions that help expand shapeshifter to be compatible with additional file formats. If you are
interested in contributing, please follow the instructions [here](https://github.com/srp33/ShapeShifter/wiki).
## Currently Supported Formats
#### Input Formats:
* CSV
* TSV
* JSON
* Excel
* HDF5
* Parquet
* MsgPack
* Stata
* Pickle
* SQLite
* ARFF
* GCT
* Kallisto
* GEO
#### Output Formats:
* CSV
* TSV
* JSON
* Excel
* HDF5
* Parquet
* MsgPack
* Stata
* Pickle
* SQLite
* ARFF
* GCT
* RMarkdown
* JupyterNotebook
## Future Formats to Support
We are working hard to expand ShapeShifter to work with even more file formats! Expect the following formats to be
included in future releases:
* Fixed-width files (fwf)
* Genomic Data Commons clinical XML
The official repository for the shapeshifter Python module, which allows for:
* Transforming tabular data sets from one format to another.
* Querying large data sets to filter out useful data.
* Selecting additional columns/features to include in the resulting data set.
* Merging data sets of various formats into a single file.
* Gzipping resulting data sets, as well as the ability to read gzipped files.
Click for information on the [shapeshifter command-line tool](https://github.com/srp33/ShapeShifter-CLI), which combines
the features of shapeshifter with the ease and speed of the command-line!
Basic use is described below, but see the full documentation on [Read the Docs](https://shapeshifter.readthedocs.io/en/latest/).
## Install
`pip3 install shapeshifter`
## Basic Use
After installing, import the ShapeShifter class with `from shapeshifter import ShapeShifter`. A ShapeShifter object
represents the file to be transformed. It is then transformed using the `export_filter_results` method. Here is a simple
example of file called `input_file.tsv` being transformed into an HDF5 file called `output_file.h5`, while filtering
the data on sex and age:
```python
from shapeshifter import ShapeShifter
my_shapeshifter = ShapeShifter("input_file.tsv")
my_shapeshifter.export_filter_results("output_file.h5", filters="Sex == 'M' and Age > 40")
```
Note that the type of file being read and exported to were not stated explicitly but inferred by shapeshifter based on
the file extensions provided. If necessary, `input_file_type` and `output_file_type` can be named explicitly.
## Contributing
We welcome contributions that help expand shapeshifter to be compatible with additional file formats. If you are
interested in contributing, please follow the instructions [here](https://github.com/srp33/ShapeShifter/wiki).
## Currently Supported Formats
#### Input Formats:
* CSV
* TSV
* JSON
* Excel
* HDF5
* Parquet
* MsgPack
* Stata
* Pickle
* SQLite
* ARFF
* GCT
* Kallisto
* GEO
#### Output Formats:
* CSV
* TSV
* JSON
* Excel
* HDF5
* Parquet
* MsgPack
* Stata
* Pickle
* SQLite
* ARFF
* GCT
* RMarkdown
* JupyterNotebook
## Future Formats to Support
We are working hard to expand ShapeShifter to work with even more file formats! Expect the following formats to be
included in future releases:
* Fixed-width files (fwf)
* Genomic Data Commons clinical XML
Release files for shapeshifter 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| shapeshifter-1.1.1.tar.gz | 20.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shapeshifter-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.8 kB
Release files / shapeshifter-1.1.1.tar.gz
| Download URL | shapeshifter-1.1.1.tar.gz |
|---|---|
| Size | 20.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9679af30022df7eeeafa11d9f8dd62408417bb439efb343f272de615eadacd33
|
|
BLAKE2b-256 checksum How to use checksums |
6403e4c6848ec7d2e5982bae145b314ef16349df4cb193585ef3450efb939914
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.7
|
Release files / shapeshifter-1.1.1-py3-none-any.whl
| Download URL | shapeshifter-1.1.1-py3-none-any.whl |
|---|---|
| Size | 35.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13c630b6ed9846149cdbc918683059236e1fcdb6171479e66a116dfdc1e68589
|
|
BLAKE2b-256 checksum How to use checksums |
ced490b58c82104ea4140229f528546c20c8ca48a3c1b03ff6c47bf194905358
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.7
|