Package smile.io
Interface Write
public interface Write
Writes data to external storage systems.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Writes the data frame to an ARFF file.static void
Writes an Apache Arrow file.static void
Writes a CSV file.static void
Writes a CSV file.static Path
Writes an object to a temporary file and returns the path of file.static void
object
(Serializable o, Path path) Writes a serializable object to a file.
-
Method Details
-
object
Writes an object to a temporary file and returns the path of file. The temporary file will be deleted when the VM exits.- Parameters:
o
- the object to serialize.- Returns:
- the path of temporary file.
- Throws:
IOException
- when fails to write the stream.
-
object
Writes a serializable object to a file.- Parameters:
o
- the object to serialize.path
- the file path.- Throws:
IOException
- when fails to write the stream.
-
csv
Writes a CSV file.- Parameters:
data
- the data frame.path
- the output file path.- Throws:
IOException
- when fails to write the file.
-
csv
static void csv(DataFrame data, Path path, org.apache.commons.csv.CSVFormat format) throws IOException Writes a CSV file.- Parameters:
data
- the data frame.path
- the output file path.format
- the CSV file format.- Throws:
IOException
- when fails to write the file.
-
arrow
Writes an Apache Arrow file. Apache Arrow is a cross-language development platform for in-memory data. It specifies a standardized language-independent columnar memory format for flat and hierarchical data, organized for efficient analytic operations on modern hardware.- Parameters:
data
- the data frame.path
- the output file path.- Throws:
IOException
- when fails to write the file.
-
arff
Writes the data frame to an ARFF file.- Parameters:
data
- the data frame.path
- the output file path.relation
- the relation name of ARFF.- Throws:
IOException
- when fails to write the file.
-