# tfdv.FeatureView

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L562-L628) |

View of a single feature.

    tfdv.FeatureView(
        stats_proto: statistics_pb2.FeatureNameStatistics
    )

This class provides accessor methods, as well as access to the underlying
proto. Where possible, accessors should be used in place of proto access (for
example, x.numeric_statistics() instead of x.proto().num_stats) in order to
support future extension of the proto.

## Methods

### `bytes_statistics`

[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L605-L609)

    bytes_statistics() -> Optional[statistics_pb2.BytesStatistics]

Retrieve byte statistics if available.

### `common_statistics`

[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L617-L628)

    common_statistics() -> Optional[statistics_pb2.CommonStatistics]

Retrieve common statistics if available.

### `custom_statistic`

[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L578-L588)

    custom_statistic(
        name: str
    ) -> Optional[statistics_pb2.CustomStatistic]

Retrieve a custom_statistic by name.

### `numeric_statistics`

[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L593-L597)

    numeric_statistics() -> Optional[statistics_pb2.NumericStatistics]

Retrieve numeric statistics if available.

### `proto`

[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L574-L576)

    proto() -> statistics_pb2.FeatureNameStatistics

Retrieve the underlying proto.

### `string_statistics`

[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L599-L603)

    string_statistics() -> Optional[statistics_pb2.StringStatistics]

Retrieve string statistics if available.

### `struct_statistics`

[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L611-L615)

    struct_statistics() -> Optional[statistics_pb2.StructStatistics]

Retrieve struct statistics if available.