def KeepCol(state, command, *columns):
    """Keep columns
    Keep only specified columns, remove everything else.
    Example: KeepCol~column1~column2
    """
    c = state.expand_columns(columns)
    state.log_info("Keep columns: "+(", ".join(c)))
    df = state.df()
    return state.with_df(df.loc[:,c])