# tfdv.generate_statistics_from_dataframe

<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_gen_lib.py#L191-L243) |

Compute data statistics for the input pandas DataFrame.

    tfdv.generate_statistics_from_dataframe(
        dataframe: DataFrame,
        stats_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,
        n_jobs: int = 1
    ) -> statistics_pb2.DatasetFeatureStatisticsList

This is a utility function for users with in-memory data represented
as a pandas DataFrame.

This function supports only DataFrames with columns of primitive string or
numeric types. DataFrames with multivalent features or holding non-string
object types are not supported.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `dataframe` | Input pandas DataFrame. |
| `stats_options` | [`tfdv.StatsOptions`](https://www.tensorflow.org/tfx/data_validation/api_docs/python/tfdv/StatsOptions) for generating data statistics. |
| `n_jobs` | Number of processes to run (defaults to 1). If -1 is provided, uses the same number of processes as the number of CPU cores. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A DatasetFeatureStatisticsList proto. ||

<br />