# tfdv.GenerateStatistics

<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/api/stats_api.py#L59-L100) |

API for generating data statistics.

    tfdv.GenerateStatistics(
        options: https://www.tensorflow.org/tfx/data_validation/api_docs/python/tfdv/StatsOptions = https://www.tensorflow.org/tfx/data_validation/api_docs/python/tfdv/StatsOptions
    ) -> None

#### Example:

      with beam.Pipeline(runner=...) as p:
        _ = (p
             | 'ReadData' >> tfx_bsl.public.tfxio.TFExampleRecord(data_location)
                 .BeamSource()
             | 'GenerateStatistics' >> GenerateStatistics()
             | 'WriteStatsOutput' >> tfdv.WriteStatisticsToTFRecord(output_path))

<br />

<br />

<br />

| ## Args ||
|---|---|
| `options` | [`tfdv.StatsOptions`](https://www.tensorflow.org/tfx/data_validation/api_docs/python/tfdv/StatsOptions) for generating data statistics. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `TypeError` | If options is not of the expected type. |

<br />

<br />

<br />

<br />

| ## Class Variables ||
|---|---|
| pipeline | `None` |

<br />