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 convert_s2p
>>> convert_s2p("reg wage exp i.female, vce(cluster education)", "la")
The function convert_s2p
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.9.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for stata2python-0.0.9-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d934a6f47d487fab7532e738b563b46d92e91344a07b4d5dfc97755a80f05f88 |
|
MD5 | e9c4c010b8770cf67d55e2cdbbefeb82 |
|
BLAKE2b-256 | c66e74578ed03400bc7e2a4674129fe86b5f1a5cd29aafe7268bf057c6c9163e |