Access DAX datasets.
Project description
PyDAX is a Python API that enables easy, pragmatic, and elegant programmatical downloading and loading of datasets.
Install the Package & its Dependencies
To install the latest version of PyDAX, run
$ pip install -U git+https://github.com/codait/pydax
Alternatively, if you have downloaded the source, switch to the source directory (same directory as this README file, cd /path/to/pydax-source) and run
$ pip install -U .
Quick Start
Import the package and load a dataset. PyDAX will download WikiText-103 dataset (version 1.0.1) if it’s not already downloaded, and then load it.
import pydax
wikitext103_data = pydax.load_dataset('wikitext103')
View available PyDAX datasets and their versions.
>>> pydax.list_all_datasets()
{'claim_sentences_search': ('1.0.2',), ..., 'wikitext103': ('1.0.1',)}
To view your globally set configs for PyDAX, such as your default data directory, use pydax.get_config.
>>> pydax.get_config()
Config(DATADIR=PosixPath('dir/to/dowload/load/from'), ..., DATASET_SCHEMA_URL='file/to/load/datasets/from')
By default, pydax.load_dataset downloads to and loads from ~/.pydax/data/<dataset-name>/<dataset-version>/. To change the default data directory, use pydax.init.
pydax.init(DATADIR='new/dir/to/dowload/load/from')
Load a previously downloaded dataset using pydax.load_dataset. With the new default data dir set, PyDAX now searches for the Groningen Meaning Bank dataset (version 1.0.2) in new/dir/to/dowload/load/from/gmb/1.0.2/.
gmb_data = load_dataset('gmb', version='1.0.2', download=False) # assuming GMB dataset was already downloaded
Notebooks
For a more extensive look at PyDAX functionality, check out these notebooks:
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
Built Distribution
File details
Details for the file pydax-0.1a0.tar.gz
.
File metadata
- Download URL: pydax-0.1a0.tar.gz
- Upload date:
- Size: 6.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5adda5fadb67d52044c249674caa59e37737f3c4c940b14a3a97e8bcc20a916 |
|
MD5 | d09f0a0c80d6d85fe700610021604ec4 |
|
BLAKE2b-256 | 7d53786dc1de389f32edabbb8c7a82de3945e417e7300b4ebdfbf2bb3bee9998 |
File details
Details for the file pydax-0.1a0-py3-none-any.whl
.
File metadata
- Download URL: pydax-0.1a0-py3-none-any.whl
- Upload date:
- Size: 38.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba9466f625184d9c6a910313a127e352999205e74820d07fe26ed3a6aaa562f7 |
|
MD5 | 11075324ea9d7f345ce4e3d562a18d28 |
|
BLAKE2b-256 | d5244f94743e19172d13b40db77e3a512c3790901eef7498706eae3b800cbfa0 |