Skip to content

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

License

Notifications You must be signed in to change notification settings

tez4/metatables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/*

About

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

Topics

Resources

License

Stars

Watchers

Forks

Languages