Skip to main content

Python library for loading/cleaning data used in qeds training

Project description

This package provides a simplified interface to datasets that we use frequently.

Loading data

To see a list of available datasets run

import qeds
qeds.data.available()

To load one of the listed datasets run

df = qeds.data.load("dataset_name")

where dataset_name is replaced by one of the names returned by qeds.data.available().

When you first load a dataset, qeds will fetch the data from somewhere online. It will then save a local copy of the data to your hard drive. Subsequent requests to load a dataset (even in different python sessions) will first attempt to load the data from your hard drive and only fetch from online if necessary.

Configuration

The qeds library is configurable. Below is a listing of available configuration options.

To see a list of valid configuration options run

import qeds
qeds.data.config.describe_options()

To set a configuration use valourm.data.options[section.option] = value.

For example, to set the configuration option for the BLS api_key I would call:

import qeds
qeds.data.options["bls.api_key"] = "MY_API_KEY"

Developer docs

Contributing datasets

To contribute a dataset you need to implement a function _retrieve_{name} inside the file data/retrieve.py. This function is responsible for obtaining the data either “by hand” (data hard coded into the function) or from online. The function must return a pandas DataFrame with the data.

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

qeds-0.4.1.tar.gz (22.0 kB view details)

Uploaded Source

File details

Details for the file qeds-0.4.1.tar.gz.

File metadata

  • Download URL: qeds-0.4.1.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for qeds-0.4.1.tar.gz
Algorithm Hash digest
SHA256 79fa6f206c1de5db18586bc848e26be72396d18926ffb82ceeea6f36a55c1a8b
MD5 a251f276898eaa187188d0f06edcffbf
BLAKE2b-256 ac68d14c375048c0ea3524f797096f4cb39c37d01033e554adba90f705fc62c0

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