Skip to content

Instantly share code, notes, and snippets.

@Syrus
Syrus / describe_population.py
Last active December 18, 2018 19:18 — forked from DGrady/describe_population.py
Analyze data frames that contain mainly categorical (string) data
import pandas as pd
def describe_population(df: pd.DataFrame) -> pd.DataFrame:
"""
Report the populated and uniqueness counts for each column of the input.
"""
N = len(df)
dtypes = df.dtypes