Skip to main content

Data wrangling on files read with pyreadstat

Project description

metatables

This is a repository that enables easy data wrangling on files read with the pyreadstat package.

PyPI Latest Release Package Status License Downloads

Installation

Run the following to install:

pip install metatables

Usage

from metatables import MetaTable

# Add files from pyreadstat to MetaTable
x = MetaTable(df, meta)

# change val_lab of variables 'F5_01' and 'F5_02'
x.val_lab(['F5_01', 'F5_02'], {1: 'Fish', 2: 'Chips'})

# change var_lab of the same variables to 'New Label'
x.var_lab(['F5_01', 'F5_02'], 'New Label')

# select columns that should be kept in MetaTable
x.select_columns(['F5_01', 'F5_02'])

# show info about variable 'F5_01'
x.show('F5_01')

# write to .sav file
x.write_sav('./filename.sav')

Documentation

The official documentation is hosted on GitHub Pages: https://tez4.github.io/metatables/

Developing

To install the package, along with the tools you need to develop and run tests, run the following in your virtualenv:

pip install -e .[dev]

Add documentation:

pdoc --html --output-dir docs metatables --config show_source_code=False -f

Create the package files:

python setup.py sdist bdist_wheel

Upload to pypi.org:

twine upload dist/*

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

metatables-0.0.14.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metatables-0.0.14-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file metatables-0.0.14.tar.gz.

File metadata

  • Download URL: metatables-0.0.14.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.3

File hashes

Hashes for metatables-0.0.14.tar.gz
Algorithm Hash digest
SHA256 b332cb6c10ac37ab144f46562a4ff2ac162f5774a30f670938f2dff3cb395600
MD5 a14fa15b65f7264a8ad250a0c1297061
BLAKE2b-256 15d29e2efc4375887e252c3626a4ca1122de3df1d6144f6662de5fae09aaa97b

See more details on using hashes here.

File details

Details for the file metatables-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: metatables-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.3

File hashes

Hashes for metatables-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 33d14035ac1166bd13b524b29dc7432cf03186087418ac3fc00fc38da5257d77
MD5 f32b5d51139084b799511bd6b508b9fd
BLAKE2b-256 5d51853eea2950a16436638b62e2d6f3540ffae34fe7a4623ccb38e822788d03

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page