Class DataExporter

java.lang.Object
com.leumanuel.woozydata.util.DataExporter

public class DataExporter extends Object
Utility class for exporting DataFrame data to different file formats. Supports CSV and JSON export formats.
Version:
1.0
Author:
Leu A. Manuel
  • Constructor Details

    • DataExporter

      public DataExporter()
  • Method Details

    • exportToCSV

      public static void exportToCSV(DataFrame dataFrame, String filePath) throws IOException
      Exports DataFrame data to a CSV file. Creates a new file or overwrites existing file with headers and data.
      Parameters:
      dataFrame - DataFrame to export
      filePath - Path where the CSV file should be saved
      Throws:
      IOException - if there is an error writing the file
    • exportToJSON

      public static void exportToJSON(DataFrame dataFrame, String filePath) throws IOException
      Exports DataFrame data to a JSON file. Creates a new file or overwrites existing file with pretty-printed JSON.
      Parameters:
      dataFrame - DataFrame to export
      filePath - Path where the JSON file should be saved
      Throws:
      IOException - if there is an error writing the file