Tabular

Modified on Thu, 17 Aug 2023 at 10:27 AM

Table of Contents

Description

With this manipulator you import any kind of tabular data the Monolith platform supports into the platform.


Application

To do any meaningful in a notebook you have to start with a data import. Unless you don’t have a 3D use case (or starting from a global import which was prepared in another notebook) you are very likely starting your notebook with this manipulator to import tabular data and start working with it.


How to use

Please refer to the FAQ article What are the supported file types for tabular data? to check which file types can be imported with this manipulator.

The importer dialog consists of three sections as shown in the image below.

  1. Import type option.
  2. Selected files are displayed here
  3. Click this button to open a file/folder selection dialog
  4. Assign a name to the dataset which is created from the imported file(s). All other manipulators are going to refer to the imported dataset via this name.

Edit dialog of Tabular importer

Import Type

The import type in the top left of the Tabular importer drives the way the File Selection Dialog is configured which opens if you click the button Add/Edit datasets.

FilesSelect data on a file-by-file basis. This is the default mode. Read here how to select files.
FoldersEnables to load files according to a file name pattern from a set of folders. This option even lets you import files recursively from a deeper folder structure. How to use the Folders option is explained in depth here.

Default import settings and advanced options

The default settings of the Tabular importer are:

Decimal signDot (.)
SeparatorComma (,)
File encodingutf-8
HeaderFile starts with a single header row. (Header row = 0)
Data sectionStarts in the second row directly after the header. (Data start row = 1)

If your data files deviates from any of these assumptions you can adjust the importer settings with Advanced Options.

Advanced Options

To show the advanced options click on Show/Hide Advanced Options in the bottom right part of the edit dialog.

Button to reveal the advanced options

The advanced options will show up:

Advanced options dialog

By these options you can control the following parameters:

Decimal Format

You can configure the decimal sign

  • default: .
  • European: ,

Column Separator

Only for ASCII data files (csv/dat/txt)

  • Comma (default)
  • Semi-Colon
  • Tabs
  • Spaces

For Spaces you can use any number of spaces between two columns.

File Encoding

  • utf-8 (default)
  • iso-8859-1
  • utf-16

Header row

Here you can specify which line in your file (either ASCII or Excel) is the header line with the column names.

This settings becomes important if you have a longer header which includes additional meta-data like test-ID, testbench-ID, test operator, …

The index is zero-based. That means, the first row has the index 0!

Data start row

This option lets you specify in which line your actual data body starts.

This option is relevant if you have a longer header and your data line doesn’t start in the second line.

Your data section doesn’t have to start in the line after the header; a gap between header and data section can be handled.

The index is zero-based. That means, the first row has the index 0!


More on this step

This section covers some special situations which sometimes also result in errors.

Columns in header and in data section don’t match

The number of columns in your header have to be at least as many as the number of data columns. If you have more data columns than header columns the importer will fail and throw an error. If you have more header columns than data columns the excess header columns will result in empty columns but the import is going to run through (if nothing else sets throws it off track).

Column mismatch between files

If you import several files with one tabular step you should make sure that columns that refer to the same parameter have the same header (exactly the same, the importer is case sensitive). If the same header appears in all files the dataset is a stack of all the files

The importer can handle a mismatch of headers among files. All occurring headers are added as a separate column which will only hold values for those files in which the header is present. A situation like this will yield many missing values. You can use other tools like Rename columns or Quick columns to remedy this situation but we recommend to do this in your initial dataset.

Header-less data

If your data does not contain any header with column names you can nevertheless import it (Even though we don’t recommend to do so). Just set the Data start row and Header row to the same index in the advanced options. All columns get generic names “ColumnNN” with NN being a counter starting at one.

If you have a single file structure doesn’t matter. If you want to import several header-less with a single importer make sure the file structures are consistent as the importer just appends the files (i.e. column1 of file2 is appended to column1 of file1 etc.).

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article