Return a tuple of ordered fields for this :class:`ColumnTS`.
430306
def fields(self):
        ''''''
        key = self.id + ':fields'
        encoding = self.client.encoding
        return tuple(sorted((f.decode(encoding)
                             for f in self.client.smembers(key))))
321875
def order_by(self, *orderings: str) -> "QuerySet":
        
        queryset = self._clone()
        new_ordering = []
        for ordering in orderings:
            order_type = Order.asc
            if ordering[0] == "-":
                field_name = ordering[1:]
                order_type = Order.desc
            else:
                field_name = ordering

            if not (
                field_name.split("__")[0] in self.model._meta.fields
                or field_name in self._annotations
            ):
                raise FieldError(
                    "Unknown field {} for model {}".format(field_name, self.model.__name__)
                )
            new_ordering.append((field_name, order_type))
        queryset._orderings = new_ordering
        return queryset
164316
def _nice_fieldnames(all_columns, index_columns):
    ""
    non_index_columns = set(all_columns).difference(index_columns)
    return index_columns + sorted(non_index_columns)
941204
def order_table_columns(table: Table, column_names: list) -> Table:
    """"""

    unordered_columns = table.column_names
    index_order = (unordered_columns.index(name) for name in column_names)
    ordered_columns = [table.columns[i] for i in index_order]
    ordered_pkey_names = [column for column in column_names
                          if column in table.primary_key_columns]
    primary_key = PrimaryKey(ordered_pkey_names)

    return Table(table.name, ordered_columns, primary_key, table.schema)
295235
private int[] getColumnList(OrderedHashSet set, Table table) {
        if (set == null) {
            return null;
        }
        return table.getColumnIndexes(set);
    }
724607
def columns(self):
        """"""

        try:
            # For resources that are metapack packages.
            r = self.expanded_url.resource.columns()
            return list(r)
        except AttributeError as e:

            pass

        return self.schema_columns
1242582
def _get_dbt_columns_from_bq_table(self, table):
        ""

        columns = []
        for col in table.schema:
            # BigQuery returns type labels that are not valid type specifiers
            dtype = self.Column.translate_type(col.field_type)
            column = self.Column(
                col.name, dtype, col.fields, col.mode)
            columns.append(column)

        return columns
53585
def calculate_columns(sequence):
    
    columns = {}

    for row in sequence:
        for key in row.keys():
            if key not in columns:
                columns[key] = len(key)

            value_length = len(str(row[key]))
            if value_length > columns[key]:
                columns[key] = value_length

    return columns
1195445
def to_dict_list(df, use_ordered_dict=True):
    
    if use_ordered_dict:
        dict = OrderedDict

    columns = df.columns
    data = list()
    for tp in itertuple(df):
        data.append(dict(zip(columns, tp)))
    return data
1024387
def _from_fields(self, fields):
        '''
        

        '''
        return _np.dtype(self.dtype()).type(next(fields))
682537
def get_ordering_fields_lookups(self):
        
        ordering_field = []
        for field_name in self.get_ordering_fields():
            ordering_field.append(self._get_ordering_field_lookup(field_name))
        return ordering_field
137785
def order_by(self, *field_names):
        
        obj = self._clone()
        obj._clear_ordering()
        for field in field_names:
            if field.startswith("-"):
                obj._ordering.append({ field.lstrip("-").replace("__", ".") : "desc" })
            else:
                obj._ordering.append({ field : "asc" })
        return obj
14295
def serialize(self, *fields):
        
        if fields:
            if not set(fields).issubset(self.data_nodes):
                raise SchemaError('Invalid field for serialization: {}'.format(set(fields).difference(self.data_nodes)))

            return OrderedDict([(k, getattr(self, k)) for k in fields])

        return OrderedDict([(k, getattr(self, k)) for k in self.data_nodes])
440510
def get_fieldsets(self, request, obj=None):
        
        fieldsets = super(BaseDynamicInlineAdmin, self).get_fieldsets(
                                                            request, obj)
        if issubclass(self.model, Orderable):
            for fieldset in fieldsets:
                fields = [f for f in list(fieldset[1]["fields"])
                          if not hasattr(f, "translated_field")]
                try:
                    fields.remove("_order")
                except ValueError:
                    pass
                fieldset[1]["fields"] = fields
            fieldsets[-1][1]["fields"].append("_order")
        return fieldsets
102160
def iter_left_col_tcs(self):
        """"""
        col_idx = self._left
        for tr in self._tbl.tr_lst[self._top:self._bottom]:
            yield tr.tc_lst[col_idx]
384036
def PyobjColumns(obj):
    ''
    return [ColumnAttr(k, type(getattr(obj, k))) for k in getPublicAttrs(obj)]
578779
function(fields) {
      var columndefs = [];
    	for(var i = 0 ; i < fields.length ; i++) {
    		columndefs.push( this.fieldToColumndef(fields[i]) );
    	}
    	return columndefs;
   }