write dataframe as csv file into R code example
Example 1: write csv in r
df <- data.frame(name = c("Jon", "Bill", "Maria"),
age = c(23, 41, 32))
write.csv(df,"C:\\Users\\Ron\\Desktop\\MyData.csv", row.names = FALSE)
Example 2: how to save a dataframe into an csv file
df.to_csv('file_name.csv', index=False)
Example 3: r write to csv
write.csv(Your DataFrame,"Path where you'd like to export the DataFrame\\File Name.csv", row.names = FALSE)