Takes in Stata commands and outputs their Python equivalent
Project description
Stata2Python
This package takes in Stata commands and outputs their Python equivalents. It currently supports the following commands: -
- ttest (doing a t-test)
- gen (generating new columns)
- describe (describing the data)
- corr (correlation matrix)
- scatter (make a scatter plot)
- hist (make a histogram)
- reg (run a regression)
Example usage via terminal
pip install --upgrade stata2python
python3
>>> from stata2python import stata2python
>>> stata2python("reg wage exp i.female, vce(cluster education)", "la")
The function stata2python
takes in a Stata command as a string, followed by (optionally) the name of a Python DataFrame as a string, and outputs the relevant Python equivalent to the Stata command.
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
stata2python-0.0.12.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for stata2python-0.0.12-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b95e5c92dedce5e74c5e8bcd139fac6c4dec1e5378d797def4d918de50fb2d59 |
|
MD5 | 71d6fdd7b3f7f80b26a7a5a58c473cb7 |
|
BLAKE2b-256 | 4eaf0235919e033c7cfa2b5421efba816d4e120c42a49840607abdaed8ed5b15 |