wbuchanan / readit

A Python plugin for Stata

Home Page:https://wbuchanan.github.io/readit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

READIT

readit is a Python enabled Stata package to read and append multiple files quickly and easily.

## Usage

Read and combine an arbitrary number of SPSS files in a directory and clear any existing data from memory:

>>> readit "'test/*.sav'", c

Read all files of any format that start with auto clear existing data from memory and rename some of the variables once the underlying files are combined:

>>> readit "'test/auto*'", ren('gear_ratio': 'gratio') c

Read all MS Excel, Feather, and SPSS files in the test directory, clear existing data from memory, rename some variables, and pass arguments to the underlying pandas methods:

>>> readit "'test/*.xlsx', 'test/*.feather', 'test/*.sav'", clear ren('src2' : 'backupsrc', 'gear_ratio' : 'gearRatio', 'datatype': 'filetype') "sep = ',', na_values = '', convert_categoricals = False"

About

A Python plugin for Stata

https://wbuchanan.github.io/readit

License:MIT License


Languages

Language:Stata 69.0%Language:Python 30.9%Language:TeX 0.1%