<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def select(*args):
 """Select specific columns from DataFrame. Output will be DplyFrame type. Order of columns will be the same as input into select. Out: color carat 0 E 0.23 1 E 0.21 2 E 0.23 Grouping variables are implied in selection. returns a dataframe like `df[[X.a, X.b, X.c]]` with the variables appearing in grouped order before the selected column(s), unless a grouped variable is explicitly selected returns a dataframe like `df[[X.a, X.c, X.b]]` """

  def select_columns(df, args):
    columns = [column._name for column in args]
    if df._grouped_on:
      for col in df._grouped_on[::-1]:
        if col not in columns:
          columns.insert(0, col)
    return columns
  return lambda df: df[select_columns(df, args)]