TabularStructure
TabularStructure[tab]
gives structural information about the Tabular tab for each column.
TabularStructure[tab,cols]
gives structural information for the columns cols.
TabularStructure[tab,cols,props]
selects the properties props to report.
更多信息
- TabularStructure is typically used to get structural information for each column.
- TabularStructure[tab,cols,props] returns another Tabular object in which the properties props are column keys and the columns cols are entries in a key column called "ColumnKey". Each row contains information for one of the original columns.
- Possible forms cols of column specification include:
-
All all columns of the input Tabular data {col1,col2,…} list of columns of the input data spatt string pattern for the column keys of the data crit criterion function to select columns keys - Possible string patterns spatt include strings with wild characters, such as "col*" and StringExpression objects such as "col"~~__.
- The criterion function crit takes named variables #ColumnKey, providing the column key, and #ElementType, providing the type of the elements of the column.
- Possible properties props include:
-
"ColumnType" type of the column "MissingCount" number of missing elements in the column "NonMissingCount" number of non-missing elements in the column "ByteCount" byte count of the column "DuplicateFreeQ" whether the column has unique entries "CountDistinct" number of unique entries {prop1,prop2,…} list of properties propi above All list of all the properties above Automatic automatic choice of some of the properties above
范例
打开所有单元关闭所有单元基本范例 (1)
Build a tabular report about the columns of a Tabular object:
Include only some columns and report only about some properties:
Scope (3)
Take tabular data about the Titanic passengers:
Compute a structural summary of the data:
Add more properties, including information about possible duplication of entries in each column:
Take tabular data about the elements:
Find a structural summary for some of the columns:
Report only about the original columns that contain "u" in their name:
Restrict to the columns of "Integer64" type:
Take tabular data about the Titanic passengers:
Find a structural report with the default properties:
Include all available properties, including some reporting about the possible presence of duplicate entries:
Applications (1)
Find out which columns of a Tabular object could be used as key columns for indexing it:
Only duplicate-free columns can be key columns, so that rows are uniquely identified by their values:
Use for example the "state" column, after extracting a subset of the columns:
Properties & Relations (3)
TabularStructure[tab] returns a Tabular object whose key column contains the column keys of tab:
TabularStructure of an anonymous Tabular object does not have the key column:
Take a Tabular object:
A structural summary about zero columns will contain no rows:
A structural summary with zero properties will contain no columns other than the key column:
文本
Wolfram Research (2025),TabularStructure,Wolfram 语言函数,https://reference.wolfram.com/language/ref/TabularStructure.html.
CMS
Wolfram 语言. 2025. "TabularStructure." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/TabularStructure.html.
APA
Wolfram 语言. (2025). TabularStructure. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/TabularStructure.html 年