# tfdv.get_slice_stats

<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#L323-L344) |

Get statistics associated with a specific slice.

    tfdv.get_slice_stats(
        stats: statistics_pb2.DatasetFeatureStatisticsList, slice_key: Text
    ) -> statistics_pb2.DatasetFeatureStatisticsList

<br />

<br />

<br />

| ## Args ||
|---|---|
| `stats` | A DatasetFeatureStatisticsList protocol buffer. |
| `slice_key` | Slice key of the slice. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Statistics of the specific slice. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If the input statistics proto does not have the specified slice statistics. |

<br />