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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stata2python-0.0.16.tar.gz.
File metadata
- Download URL: stata2python-0.0.16.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75a6b41183f7714b88036ba4f0cb8dbd86f51984eb778b7d39542d3ba8f4d9fb
|
|
| MD5 |
16b2d36885e320116532b1ead3946e9e
|
|
| BLAKE2b-256 |
fec5f29dbd6ad7c6293f536c83cca1b03856047a7f784b9c2258528bc6b9a665
|
File details
Details for the file stata2python-0.0.16-py2.py3-none-any.whl.
File metadata
- Download URL: stata2python-0.0.16-py2.py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17f39daf5d986092636d7b241438800f832196decd285bb7ac37ca84e649bf8c
|
|
| MD5 |
2e2ccb91b136f6251068e5322a0bf9f4
|
|
| BLAKE2b-256 |
4ad9b39db958bbabd8b2fe5de06f469af3deb7c22b456d6535a9507e5bf2b594
|