1
我正在Rstudio筆記本中運行一些python塊,其中包括讀取csv文件和打印基本統計信息。我無法找到打印統計信息(describe())作爲輸出的方式。 這裏是代碼:運行python的Rstudio筆記本(rmarkdown):描述未顯示
```{python, engine.path = '/home/user/anaconda3/bin/python3'}
import pandas
data_py = pandas.read_csv('/home/user/datafiles/data.csv', sep= ';')
```
```{python, engine.path = '/home/user/anaconda3/bin/python3'}
data_py.describe(include='all')
```
沒有輸出打印。 我也試過:
```{python, engine.path = '/home/user/anaconda3/bin/python3'}
print(data_py.describe(include='all'))
```
和
```{python, engine.path = '/home/user/anaconda3/bin/python3'}
summary = data_py.describe(include='all')
print(summary)
```
沒有成功。 有什麼幫助嗎?
有關http://rmarkdown.rstudio.com/r_notebooks.html#comment-2935043857? – lukeA
不是。我改變了代碼以包含所有內容:''{python,engine.path ='/ home/user/anaconda3/bin/python3'} import pandas data_py = pandas.read_csv('/ home/user /datafiles/data.csv',sep =';') data_py.describe(include ='all') '''沒有成功 – COLO