Node Inputs

csv file name

  • Type: File
  • Description: The name of the CSV file to be sorted.

column index

  • Type: Integer
  • Description: The index of the column to be sorted on. Columns are zero-indexed, meaning that the first column is denoted as 0, the second as 1, and so on.

sorted csv file name

  • Type: String
  • Description: The name of the sorted CSV file that the node will generate.

has headers

  • Type: Boolean
  • Description: Indicates whether the CSV file has headers. If selected (true), the node will treat the first row as the header.
  • Optional: This is an optional parameter.

reverse sort

  • Type: Boolean
  • Description: Defines the order of the sort. If selected (true), the node will sort the column in descending order.
  • Optional: This is an optional parameter.

Node Output

sorted csv file name

  • Type: String
  • Description: The name of the sorted CSV file that has been generated by the node.

Node Functionality

The “Sort CSV” node is designed to organize the rows within a CSV file based on the values found in a specified column. Once the column is chosen via its index, the node will arrange the rows either in ascending (default) or descending order, depending on the user’s choice. Additionally, the node recognizes if the CSV contains headers and keeps them at the top of the file.

The resulting sorted CSV file is then saved with a specific name provided by the user, which can be subsequently used for other purposes or downloaded for review.

When To Use

You would use the “Sort CSV” node when you have a large CSV file that you need to rearrange so that the data is presented in a more ordered and meaningful manner. For example:

  • To prioritize or analyze data according to certain numeric values or text.
  • To prepare data before creating reports, where sorted information is easier to interpret.
  • When performing data cleaning or categorization tasks that require the data to be in a specific order.

This node simplifies the process of sorting CSV files, eliminating the need for manual sorting or the use of complex spreadsheet software. Users without technical backgrounds, such as business analysts or data enthusiasts, can quickly use this node to refactor their datasets for further analysis or visualization.