How to import python packages using knit r?

I want to integrate python code into r notebook (or even rmarkdown document). I can run Python using a piece of python code:

```{python} 

```

However, I cannot import the package (e.g. pandas). I have anaconda installed that has pandas installed, however I cannot import it. Can someone give me directions on how I can import packages into r via knitr, preferably using anaconda?

+4
source share
1 answer
{python, engine.path="/path/to/your/anaconda3/bin/python"}
0
source

Source: https://habr.com/ru/post/1660138/


All Articles