Open
Description
Add something about this to the User Guide, and maybe also about other 'nbstata` utilities that may be helpful when working in a Python notebook:
When you want to use Stata within a Python notebook (as opposed to a Stata notebook), 'nbstata' provides a convenient way to load Stata so that the %%stata
magic will work. For most users (when a config file is not needed to locate the Stata directory), the following lines will do it:
import nbstata
nbstata.launch_stata()
Compare Method 1 in the official pystata docs. (All the methods suggested by Stata require you to type out the Stata directory and edition in the code to initialize pystata.)