Skip to content

FILE: docs/api/pipelines.md

Pipelines API Reference

High‑level workflows that combine multiple DataKit functions into single calls.


quick_eda(df, show_plots=True, save_dir=None, export_profile=False, verbose=True)

Run a full EDA pipeline: profile, missing recommendations, distributions, correlation.

Parameters: - df – pandas DataFrame - show_plots – display plots if True - save_dir – directory to save plots (None = don't save) - export_profile – export HTML profile report (saves as profile.html) - verbose – print reports from sub‑functions

Returns: Dict with keys: - 'profile' – the profile dict from profile_df() - 'corr_matrix' – correlation matrix (or None if <2 numeric columns)

Example:

result = dk.quick_eda(df)
result = dk.quick_eda(df, save_dir='eda_output/', export_profile=True)


groupby_chart(df, by, metric, agg='mean', chart_type='bar', annotate=True, title=None, figsize=(10, 5), show=True, save=None, dpi=150)

Group by a column, aggregate a metric, and plot the result.

Parameters: - df – pandas DataFrame - by – column name or list of columns to group by - metric – column name to aggregate - agg – aggregation function ('mean', 'sum', 'count', 'median', or a callable) - chart_type'bar' (vertical) or 'barh' (horizontal) - annotate – add value labels on bars - title – chart title (auto‑generated if None) - figsize – figure size (width, height) - show – call plt.show() - save – file path to save figure (None = don't save) - dpi – resolution for saved figure

Returns: matplotlib Axes object

Example:

dk.groupby_chart(df, by='region', metric='sales', agg='sum')
dk.groupby_chart(df, by=['year', 'quarter'], metric='revenue', agg='mean', chart_type='barh')