Search code examples
pythonrsas

Python or R data frame to unix server


I am currently a SAS data analyst. However, I am trying to learn R and Python as alternatives. So, my question is the following.

In SAS, there is a way to save a SAS data set to the unix server. Is there a way in R or Python to save a data frame to the unix server. In SAS, we do this with a libname and then a data set or proc sql. What is the equivalent in R or Python?

My concern is that once I use R or Python, I have a data frame from a Teradata or Oracle SQL query that I want to save the data frame on a unix server so it will not be deleted.


Solution

  • In R you can write to disk in many different ways...

    writeRDS or from the readr package write_rds save the R files. Additionally, you can save to any other kind of format you want (feather, csv, etc)

    Additionally you can write directly to a table in a database if that is your jam. See https://db.rstudio.com/dbi/

    Is this what you are looking for?