Skip to content

← file_system package

ExportCSV

Export data into a csv file.

This node accepts a multi-channel time series and writes it to a csv (comma-separated values) file. The result can be read with numerous analysis packages, including Excel, MATLAB(tm), and SPSS(tm). This node is only for saving the output of an offline processing pipeline (it expects the entire dataset in a single packet). For continously writing data to disk (i.e., from a online/streaming pipeline, use RecordToCSV). This node will interpret your data as a multi-channel time series, even if it is not: if your packets have additional axes, like frequency, feature, and so on, these will be automatically vectorized into a flat list of channels. Also, if you send data with multiple instances (segments) into this node, subsequent instances will be concatenated along time, so the data written to the file will appear contiguous and non-segmented (channels by samples). The way the file is laid out is as one row per sample, where the values of a sample, which are the channels, are separated by commas. Optionally this node can write the names of each channel into the first row (as a header, which is supported by some software), and it can also optionally append the time-stamp of each sample as an additional column at the end of each row. Version 1.3.0

Ports/Properties

data

Input signal.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: Packet (can be None)
  • data direction: IN

done

Flag to indicate that the node is finished processing if wired into the PipelineDone node.

  • verbose name: Done
  • default value: False
  • port type: DataPort
  • value type: bool (can be None)
  • data direction: OUT

filename

File name to export data to. Can be the full path or a relative path or filename if `output_root is specified.

  • verbose name: Filename
  • default value: untitled.csv
  • port type: StringPort
  • value type: str (can be None)

output_root

Path to the output folder; if specified, the filename will be relative to this folder. Alternatively, this can be left empty and the full path may be specified in filename).

  • verbose name: Output Root
  • default value:
  • port type: StringPort
  • value type: str (can be None)

file_exists

What to do if a file with the name filename (and located in output_root) already exists. If skip, this node will perform no export. If error, the pipeline execution will stop. If rename, the original existing file will be renamed with "_n" added to the filename where _n is an incremental number (i.e. _1), and a new file will be written with the specified filename. Note that this option only currently works on the local filesystem.

  • verbose name: File Exists
  • default value: overwrite
  • port type: EnumPort
  • value type: str (can be None)

col_axis

Axis along which to select for the columns. Use the space axis when you want to select channels, the instance axis to select trials or segments, the feature axis when the data happens to contain features (e.g., after feature extraction), or time and frequency axes.

  • verbose name: Columns Select Axis
  • default value: space
  • port type: ComboPort
  • value type: str (can be None)

column_header

Include specified labels as columns headers. If this is set, the first row in the file will have the specified label names. Some analysis programs can interpret this as the header row of the table (basically as column labels).

  • verbose name: Include Column Header
  • default value: True
  • port type: BoolPort
  • value type: bool (can be None)

row_axis

Axis along which to select for the rows. Use the space axis when you want to select channels, the instance axis to select trials or segments, the feature axis when the data happens to contain features (e.g., after feature extraction), or time and frequency axes.

  • verbose name: Rows Select Axis
  • default value: frequency
  • port type: ComboPort
  • value type: str (can be None)

row_header

Include specified labels as row headers. If this is set, the first column in the file will have the label names. Some analysis programs can interpret this as the header column of the table (basically as row labels).

  • verbose name: Include Row Header
  • default value: True
  • port type: BoolPort
  • value type: bool (can be None)

axis_description

If both column and row headers are used, this text description for row by column items (e.g . Frequency (Hz) by Channel) will appear in array(1,1).

  • verbose name: Axis Description
  • default value:
  • port type: StringPort
  • value type: str (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)

cloud_host

Cloud storage host to use (if any). You can override this option to select from what kind of cloud storage service data should be downloaded. On some environments (e.g., on NeuroScale), the value Default will be map to the default storage provider on that environment.

  • verbose name: Cloud Host
  • default value: Default
  • port type: EnumPort
  • value type: str (can be None)

cloud_account

Cloud account name on storage provider (use default if omitted). You can override this to choose a non-default account name for some storage provider (e.g., Azure or S3.). On some environments (e.g., on NeuroScale), this value will be default-initialized to your account.

  • verbose name: Cloud Account
  • default value:
  • port type: StringPort
  • value type: str (can be None)

cloud_bucket

Cloud bucket to read from (use default if omitted). This is the bucket or container on the cloud storage provider that the file would be written to. On some environments (e.g., on NeuroScale), this value will be default-initialized to a bucket that has been created for you.

  • verbose name: Cloud Bucket
  • default value:
  • port type: StringPort
  • value type: str (can be None)

cloud_credentials

Secure credential to access cloud data (use default if omitted). These are the security credentials (e.g., password or access token) for the the cloud storage provider. On some environments (e.g., on NeuroScale), this value will be default-initialized to the right credentials for you.

  • verbose name: Cloud Credentials
  • default value:
  • port type: StringPort
  • value type: str (can be None)