code: def _get_continuous_and_ordinal_array(x):
      
      nominal_columns = x.select_dtypes(include=['object', 'category']).columns
      ordinal_columns = pandas.Index([v for v in nominal_columns if x[v].cat.ordered])
      continuous_columns = x.select_dtypes(include=[numpy.number]).columns
  
      x_num = x.loc[:, continuous_columns].astype(numpy.float64).values
      if len(ordinal_columns) > 0:
          x = _ordinal_as_numeric(x, ordinal_columns)
  
          nominal_columns = nominal_columns.difference(ordinal_columns)
          x_out = numpy.column_stack((x_num, x))
      else:
          x_out = x_num
  
      return x_out, nominal_columns
docs: Convert array from continuous and ordered categorical columns