FromTabular
FromTabular[tab,"form"]
converts a Tabular object tab to an object given by "form".
FromTabular[tab,"form",assoc]
uses directives from the association assoc to give details of the conversion.
更多信息
- FromTabular is typically used to provide control over how Tabular objects are converted to other data objects.
- In FromTabular[tab,form,…], the structure specification "form" can include:
-
"Columns" collection of TabularColumn objects "Rows" list of rows "Matrix" matrix of values "Dataset" multilevel data "TimeSeries" TimeSeries object "TemporalData" TemporalData object - The association assoc can contain specific information on how to convert tabular to the different forms.
- When converting to TimeSeries or TemporalData, possible keys in assoc include:
-
"TimeColumn" "RowNumber" column to use for times (default integer indices) "ValueColumns" Automatic columns to use for values (default all except time column)
范例
打开所有单元关闭所有单元基本范例 (1)
Scope (15)
Rows and Columns (5)
Get rows from a Tabular object without column keys:
Get rows from a Tabular object with column keys:
Returns list of associations with column keys:
Get columns from a Tabular object without column keys:
Return a list of TabularColumn objects:
Obtain the list directly from Tabular:
Get columns from a Tabular object with column keys:
Return an association with column keys:
Take a Tabular object with list entries:
Both "Rows" and "Columns" forms affect only the two top levels of the Tabular object:
Dataset (4)
Get a Dataset expression from a Tabular object without column keys:
Obtain the same result by using Dataset:
Get a Dataset expression from a Tabular object with column keys:
The column keys are preserved:
Take a Tabular object with a key column:
The key column is converted into the row keys of the dataset:
Normalize to see the key column entries as association keys:
Take a Tabular object with two key columns:
The key columns "A" and "B" are converted into keys of nested levels of the dataset:
Normalize to see the key columns entries as association keys:
TimeSeries (3)
Convert a Tabular object without column keys into TimeSeries:
The default time stamps are positive integers:
Specify which columns to use for times and values:
Convert a Tabular object with column keys into TimeSeries:
The default time stamps are positive integers:
Specify which columns to use for times and values using column names:
Converting a Tabular object with column keys preserves the keys as component names:
TemporalData (3)
Convert a Tabular object without column keys into TemporalData:
Each column becomes a path, and the default time stamps are positive integers:
Convert a Tabular object with column keys into TemporalData:
Specify which columns to use for times and values:
Convert a Tabular object with ExtendedKey into TemporalData:
Applications (2)
Sales Data (1)
Use PivotToColumns to separate sales for each city:
Create a TemporalData with "Date" used as the "TimeColumn":
Financial Time Series (1)
Properties & Relations (1)
FromTabular[tab,"Rows"] and FromTabular[tab,"Columns"] effectively return the transpose of each other:
Possible Issues (2)
FromTabular[...,"Columns"] returns an Association when columns have specified keys:
Get the list of columns directly from the Tabular object:
For a Tabular without column keys, FromTabular[...,"Columns"] returns a list:
For "TemporalData" form, FromTabular creates multiple paths from columns but admits only one set of time stamps:
文本
Wolfram Research (2025),FromTabular,Wolfram 语言函数,https://reference.wolfram.com/language/ref/FromTabular.html.
CMS
Wolfram 语言. 2025. "FromTabular." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/FromTabular.html.
APA
Wolfram 语言. (2025). FromTabular. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/FromTabular.html 年