def log_dataframe_task(parent, df, **kwargs):
    """Log a dataframe within a `prefect` flow.

    This `prefect` task can be used within a flow to
    log a dataframe to an existing project or experiment.

    Parameters
    ----------
    parent : rubicon.client.Project or rubicon.client.Experiment
        The project or experiment to log the dataframe to.
    df : pandas.DataFrame or dask.dataframe.DataFrame
        The `pandas` or `dask` dataframe to log.
    kwargs : dict
        Additional keyword arguments to be passed to
        `Project.log_dataframe` or `Experiment.log_dataframe`.

    Returns
    -------
    rubicon.client.Dataframe
        The logged dataframe.
    """
    return parent.log_dataframe(df, **kwargs)