I'm using R markdown and trying to access to variables in the python chunk from r chunk, but the results return NULL
in the r chunk. I tried to follow the instruction here. My code as follow, what is the issue here?
```{r setup}
library(reticulate)
use_python("/usr/local/bin/python")
```
```{python}
import pandas as pd
Dict = {'x1': [1,2,3], 'x2': [4,5,6], 'x3': [7,8,9] }
my_df2 = pd.DataFrame(Dict)
print(my_df2) # works fine
```
```{r}
print(py$my_df2) # return NULL
```
Thanks!