EconPapers    
Economics at your fingertips  
 

PyStata - Python and Stata integration

Zhao Xu
Additional contact information
Zhao Xu: StataCorp

London Stata Conference 2021 from Stata Users Group

Abstract: Stata 16 introduced tight integration with Python, allowing users to embed and execute Python code from all of Stata's programming environments, such as Command Window, do-files and ado-files. Stata 17 introduced the pystata Python package. With this package, users can call Stata from various Python environments, including Jupyter Notebook, Jupyter Lab, Spyder IDE, PyCharm IDE, and system command-line environments that can access Python (Windows Command Prompt, macOS terminal, Unix terminal). In this talk, I will introduce two ways to run Stata from Python: the IPython magic commands and a suite of API functions. I will then demonstrate how to use them to seamlessly pass data and results between Stata and Python.

Date: 2021-09-12
New Economics Papers: this item is included in nep-isf
References: Add references at CitEc
Citations:

Downloads: (external link)
http://fmwww.bc.edu/repec/usug2021/usug21_xu.pdf presentation materials (application/pdf)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:boc:usug21:12

Access Statistics for this paper

More papers in London Stata Conference 2021 from Stata Users Group Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().

 
Page updated 2025-03-19
Handle: RePEc:boc:usug21:12