class_docstr: Interface for Pandas GroupBy operations allowing specified group order.
  
  Writing our own class to do this has a few advantages:
  - It constrains the interface between Plot and Stat/Move objects
  - It allows control over the row order of the GroupBy result, which is
    important when using in the context of some Move operations (dodge, stack, ...)
  - It simplifies some complexities regarding the return type and Index contents
    one encounters with Pandas, especially for DataFrame -> DataFrame applies
  - It increases future flexibility regarding alternate DataFrame libraries
class_docstr_tok: ["Interface","for","Pandas","GroupBy","operations","allowing","specified","group","order",".","Writing","our","own","class","to","do","this","has","a","few","advantages",":","-","It","constrains","the","interface","between","Plot","and","Stat\/Move","objects","-","It","allows","control","over","the","row","order","of","the","GroupBy","result",",","which","is","important","when","using","in","the","context","of","some","Move","operations","(","dodge",",","stack",",","...",")","-","It","simplifies","some","complexities","regarding","the","return","type","and","Index","contents","one","encounters","with","Pandas",",","especially","for","DataFrame","-",">","DataFrame","applies","-","It","increases","future","flexibility","regarding","alternate","DataFrame","libraries"]
docstr: Reorder result columns to match original order with new columns appended.
docstr_tok: ["Reorder","result","columns","to","match","original","order","with","new","columns","appended","."]
code: def _reorder_columns(self, res, data):
      """Reorder result columns to match original order with new columns appended."""
      cols = [c for c in data if c in res]
      cols += [c for c in res if c not in data]
      return res.reindex(columns=pd.Index(cols))
  
file_path: seaborn/seaborn/_core/groupby.py
imports: from __future__ import annotations
  from typing import cast, Iterable
  import pandas
  from seaborn._core.rules import categorical_order
  from typing import TYPE_CHECKING
label_desc: Use image node_id 3 for calling the GroupBy obj's underlying member method code with example usage: obj._reorder_columns(res, data) and returns: res