def save_df(df, name, engine='pickle', key='df', **kwargs):
    """Save a dataframe to disk.
    """
    meth = 'to_{}'.format(engine)
    if engine == 'hdf':
        kwargs['key'] = key
    if engine == 'csv':
        kwargs.setdefault('index', False)
    getattr(df, meth)(name, **kwargs)
