Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Python: Importing pandas (and other packages) into STATA 16

    I am running STATA 16 and installed Anaconda to be able to run python code from STATA. The installation worked well and I am able to run basic commands (such as 2+2) and to import certain python packages (such as numpy and os).

    However, I am unable to import pandas (and other packages).

    When I type:

    Code:
    import pandas
    I get the following error:

    Code:
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: No module named pandas
    r(7102);
    Also, I am unable to run many conda commands such as:

    Code:
    conda list
    or

    Code:
    conda install xgboost
    these commands run to no end with "..." displayed endlessly.

    Any ideas on what the problem may be?

    Thanks in advance,
    Jonathan

  • #2
    Jonathan also contacted me for this, my replies to the raised queries are given in the comment section of the blog post. https://fintechprofessor.com/2019/06...with-stata-16/
    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

    Comment


    • #3
      Also, see the Stata FAQ:

      Comment

      Working...
      X