WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center
  • Import supports the MTP format.

Background & Context

    • Minitab portable worksheet format.
    • Statistical data format.
    • Used for exchanging and archiving statistical data.
    • MTP is an acronym derived from Minitab Portable Worksheet.
    • Plain text ASCII format.
    • Stores arrays of labeled data.
    • Developed in the 1970s as part of the Minitab Statistical Software.

Import

  • Import ["file.mtp"] imports an MTP file, returning a list of lists.
  • Import ["file.mtp"] returns a two-dimensional array of strings and numbers, representing the rows and columns stored in the file.
  • Import ["file.mtp",elem] imports the specified element from an MTP file.
  • Import ["file.mtp",{elem,suba,subb,}] imports a subelement.
  • Import ["file.mtp",{{elem1,elem2,}}] imports multiple elements.
  • The import format can be specified with Import ["file", "MTP"] or Import ["file",{"MTP",elem,}].
  • See the following reference pages for full general information:
  • Import import from a file
    CloudImport import from a cloud object
    ImportString import from a string
    ImportByteArray import from a byte array

Import Elements

  • General elements:
  • "Elements" list of elements and options available in this file
    "Summary" summary of the file
    "Rules" list of rules for all available elements
  • Data representation elements:
  • "Data" datasets arranged as a table
    "EventSeries" table data as an EventSeries
    "LabeledData" datasets given as a list of rules
    "Tabular" table data as a Tabular object
    "TimeSeries" table data as a TimeSeries
  • Import uses the "Data" element by default.
  • Textual information:
  • "TextData" textual data given as a list of rules

Options

  • Import option:
  • "EmptyField" "" how empty cells are represented in the Wolfram System
    "TimeColumn" Automatic column to use for times in "EventSeries" and "TimeSeries" elements

Examples

open all close all

Basic Examples  (2)

Import summary of an MTP file:

Wolfram Language code: Import[ "ExampleData/oldfaithful.mtp", "Summary"]

Import an MTP file as a Tabular object:

Wolfram Language code: Import[ "ExampleData/oldfaithful.mtp", "Tabular"]

Scope  (6)

Show the Import elements available in an MTP sample file:

Wolfram Language code: Import[ "ExampleData/oldfaithful.mtp", "Elements"]

Import the data as a list of lists:

Wolfram Language code: Import[ "ExampleData/oldfaithful.mtp", "Data"]

Read all numerical data from this file as an array, typesetting the first 10 rows as a table:

Wolfram Language code: Take[Import["ExampleData/oldfaithful.mtp", "Data"], 10]//TableForm

Import this file as a list of rules, each representing a labeled dataset:

Wolfram Language code: Import[ "ExampleData/oldfaithful.mtp", "LabeledData"]

Import the textual data:

Wolfram Language code: Import[ "ExampleData/oldfaithful.mtp", "TextData"]

Import an MTP file as an EventSeries object:

Wolfram Language code: Import[ "ExampleData/oldfaithful.mtp", "EventSeries"]

Import an MTP file as a TimeSeries object:

Wolfram Language code: Import[ "ExampleData/oldfaithful.mtp", "TimeSeries"]

Import Options  (1)

"TimeColumn"  (1)

By default, the time column is selected automatically for "TimeSeries" and "EventSeries" elements:

Wolfram Language code: Import[ "ExampleData/oldfaithful.mtp", "TimeSeries"]

Use the "TimeColumn" option to specify the time column:

Wolfram Language code: Import[ "ExampleData/oldfaithful.mtp", "TimeSeries", "TimeColumn" -> "DurLast"]

See Also

Import   CloudImport

Formats: HDF5   CSV   Parquet

History

Introduced in 2007 (6.0) | Updated in 2025 (14.3) 2026 (15.0)

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /