def _postprocess_for_cut(fac, bins, retbins, x_is_series, series_index, name):
 if x_is_series:
  fac = Series(fac, index=series_index, name=name)
 if (not retbins):
  return fac
 return (fac, bins)

def _postprocess_for_cut ( fac , bins , retbins , x_is_series , series_index , name ) : if x_is_series : fac = Series ( fac , index = series_index , name = name ) if ( not retbins ) : return fac return ( fac , bins )
handles post processing for the cut method where we combine the index information if the originally passed datatype was a series .