Package com.leumanuel.woozydata.util
Class DataExporter
java.lang.Object
com.leumanuel.woozydata.util.DataExporter
Utility class for exporting DataFrame data to different file formats.
Supports CSV and JSON export formats.
- Version:
- 1.0
- Author:
- Leu A. Manuel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidexportToCSV(DataFrame dataFrame, String filePath) Exports DataFrame data to a CSV file.static voidexportToJSON(DataFrame dataFrame, String filePath) Exports DataFrame data to a JSON file.
-
Constructor Details
-
DataExporter
public DataExporter()
-
-
Method Details
-
exportToCSV
Exports DataFrame data to a CSV file. Creates a new file or overwrites existing file with headers and data.- Parameters:
dataFrame- DataFrame to exportfilePath- Path where the CSV file should be saved- Throws:
IOException- if there is an error writing the file
-
exportToJSON
Exports DataFrame data to a JSON file. Creates a new file or overwrites existing file with pretty-printed JSON.- Parameters:
dataFrame- DataFrame to exportfilePath- Path where the JSON file should be saved- Throws:
IOException- if there is an error writing the file
-