Column Type Conversion

The Convert Column Types tab allows you to convert column data types. Use this when converting strings to numbers or changing date formats.

Basic Usage

Opening the Type Conversion Tab

  1. Open the Data Table tab
  2. Right-click a column header
  3. Select Convert Column Types...

Configuring Conversion

  1. Select the target data type in the To column dropdown
  2. Select error handling in On Error
  3. Click Preview to review the conversion result
  4. Click Apply to execute the conversion

Type conversion settings

In this example, the bill_length_mm column is being converted from string to float64. The preview table on the right shows the conversion results.

Selecting columns to convert

Data Types

The data types available in MIDAS are:

Data TypeDescriptionExamples
booleanBoolean valuetrue, false
int64Integer42, -100
float64Decimal3.14, -0.5
dateDate2024-01-15
datetimeDate and time2024-01-15 10:30:00
stringText"Hello", "Tokyo"

Error Handling (On Error)

Choose how to handle values that cannot be converted:

OptionDescription
NULLReplace unconvertible values with NULL (missing)
Exclude rowRemove rows containing unconvertible values from the dataset
FailStop processing and show an error if any value cannot be converted

Example: String to Integer Conversion

If the original data contains values like "abc" that cannot be converted to numbers:

  • NULL: "abc" becomes NULL (missing value)
  • Exclude row: The entire row is removed from the dataset
  • Fail: Conversion is aborted and an error message is displayed

Preview Feature

Click the Preview button to review conversion results before applying. The preview screen displays the converted data, and in Exclude row mode, rows with conversion errors are highlighted. If everything looks correct, click Apply to execute. If there are issues, click Back to return to settings and make adjustments.

Executing Conversion

When you click Apply, a dialog appears to enter a new dataset name. Enter a name and click OK to create the conversion result as a new dataset.

The original dataset is not modified. Conversion results are always saved as a new Derived Dataset.

See also