Loading a DataFrame from a file
Create and return a DataFrame from the content of the named file in the project. The file must be a CSV file, and the first data row will always be read as the header row.
- Scala syntax
-
loadDataFrameOptionFromFile(pc: ProjectContext, filename: String): Option[DataFrame] // Get the resulting Option[DataFrame] val odf1 = ProjectUtil.loadDataFrameOptionFromFile if (odf.isDefined) { val df1 = odf1.get // do something with the DataFrame } - Python syntax
-
load_dataframe_from_file(pc, filenameOrFileData) # Call can return None - R syntax
-
loadDataFrameFromFile(pc, fileName) # Call can return NULL