


The display environmental variable on RStudio Server is Sys.getenv("DISPLAY")

I've installed tkinter using sudo apt-get install python3-tk or I get an error about "ImportError: No module named 'tkinter'" when I try to show the plot. Return cls.new_figure_manager_given_figure(num, fig)įile "/home/rstudio/.local/lib/python3.6/site-packages/matplotlib/backends/_backend_tk.py", line 1008, in new_figure_manager_given_figureįile "/usr/lib/python3.6/tkinter/_init_.p"įYI - I'm running RStudio Server on Ubuntu 18.04.
While reticulate (using RStudio Preview 1.2) works fine on my local machine, when I try to run it with an RStudio Server Preview 1.2 running on an AWS EC2 instance, I get an error "TclError: couldn't connect to display ":0"įile "Reticulate is awesome, and I love that we can run python code but get all the goodies of RMarkdown including publishing to Connect. Output Pandas dataframe using print() _id. I am aware of the way to view the data from within the Environment tab, just wondering about from within a Python code chunk.Ĭode used to import and display a Pandas dataframe import pandas as pdĪpt_reg_py = pd.read_csv("data/Apartment Building Registration Data.csv") Is there a better way to view a Pandas dataframe from a Python code chunk within RStudio IDE? Ultimately I would like to have the ability to look at the columns and rows of a Pandas dataframe similarly to how you can with a dataframe from the R code chunk. When I print a Pandas dataframe it does not show all the columns like when a dataframe is "rendered" from a R code chunk. My newb question is about the output of a dataframe from the code chunk. Sorry for the super first timer newb question here, but I am looking to run python code within a RNotebook (in RStudio IDE), specifically within a python code chunk.
