# Module: tfdf.py_tree.dataspec

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/decision-forests/blob/main/tensorflow_decision_forests/component/py_tree/dataspec.py) |

Utility for the dataset specification.

A dataset specification defines how to interpret the attributes/features in a
dataset.

## Classes

[`class SimpleColumnSpec`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/inspector/SimpleColumnSpec): Simplified representation of a column spec.

## Functions

[`categorical_column_dictionary_to_list(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/dataspec/categorical_column_dictionary_to_list): Extracts the dictionary elements of a categorical column.

[`categorical_value_idx_to_value(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/dataspec/categorical_value_idx_to_value): Gets the representation value of a categorical value stored as integer.

[`categorical_vocab_iterator(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/dataspec/categorical_vocab_iterator): Returns a categorical spec's vocabulary as a list.

[`column_name_to_column_idx(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/dataspec/column_name_to_column_idx): Gets a column index from its name.

[`discretized_numerical_to_numerical(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/dataspec/discretized_numerical_to_numerical): Converts a discretized numerical value to a matching numerical value.

[`label_value_idx_to_value(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/dataspec/label_value_idx_to_value): Gets the representation value of a categorical label value.

[`make_simple_column_spec(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/dataspec/make_simple_column_spec): Creates a SimpleColumnSpec from a (full) DataSpecification.

<br />

<br />

<br />

| ## Other Members ||
|---|---|
| ColumnType | Instance of `google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper` |
| OUT_OF_DICTIONARY | `'<OOD>'` |

<br />