Actually format specific types of the index.
326242
def _format_native_types(self, na_rep='', quoting=None, **kwargs):
        
        mask = isna(self)
        if not self.is_object() and not quoting:
            values = np.asarray(self).astype(str)
        else:
            values = np.array(self, dtype=object, copy=True)

        values[mask] = na_rep
        return values
899363
def _build_indices(self):
        """"""
        result = {key: OrderedDict() for key in LINES_WITH_ID}
        for line in self.lines:
            if line.key in LINES_WITH_ID:
                result.setdefault(line.key, OrderedDict())
                if line.mapping["ID"] in result[line.key]:
                    warnings.warn(
                        ("Seen {} header more than once: {}, using first" "occurence").format(
                            line.key, line.mapping["ID"]
                        ),
                        DuplicateHeaderLineWarning,
                    )
                else:
                    result[line.key][line.mapping["ID"]] = line
            else:
                result.setdefault(line.key, [])
                result[line.key].append(line)
        return result
988222
def qindex2index(index):
        
        r = index.row()
        c = index.column()
        if c > 0x10:
            return (0x10 * r) + c - 0x11
        else:
            return (0x10 * r) + c
1371761
def build_index(self, idx_name, _type='default'):
        ""
        indexes = {}
        has_non_string_values = False
        for key, item in self.data.items():
            if idx_name in item:
                value = item[idx_name]
                # A non-string index value switches it into a lazy one.
                if not isinstance(value, six.string_types):
                    has_non_string_values = True
                if value not in indexes:
                    indexes[value] = set([])
                indexes[value].add(key)
        self.indexes[idx_name] = indexes
        if self._meta.lazy_indexes or has_non_string_values:
            # Every index is lazy
            _type = 'lazy'
        self.index_defs[idx_name] = {'type': _type}
35232
def _indices(lexer):
    """"""
    first = _expect_token(lexer, {IntegerToken}).value
    rest = _zom_index(lexer)
    return (first, ) + rest
112362
def list_output_formats(type_list):
    """"""
    out_format_list = []
    for type_item in type_list:
        item_format = default_output_format(type_item)
        out_format_list.append(item_format)

    return out_format_list
246149
function skipIndex() {
		if( childType && childType.indexOf('[]') === childType.length-2 ) {
			childType = childType.substring(0, childType.length-2);
		}
	}
1222998
private void setIndicesAndTypes() {

        DeleteByQueryRequest innerRequest = request.request();
        innerRequest.indices(query.getIndexArr());
        String[] typeArr = query.getTypeArr();
        if (typeArr!=null){
            innerRequest.getSearchRequest().types(typeArr);
        }
//		String[] typeArr = query.getTypeArr();
//		if (typeArr != null) {
//            request.set(typeArr);
//		}
	}
701914
def handle_format_group(self, field, text):
        """"""

        # Handle auto incrementing group indexes
        if field == '':
            if self.auto:
                field = str(self.auto_index)
                text[0] = (_util.FMT_FIELD, field)
                self.auto_index += 1
            elif not self.manual and not self.auto:
                self.auto = True
                field = str(self.auto_index)
                text[0] = (_util.FMT_FIELD, field)
                self.auto_index += 1
            else:
                raise ValueError("Cannot switch to auto format during manual format!")
        elif not self.manual and not self.auto:
            self.manual = True
        elif not self.manual:
            raise ValueError("Cannot switch to manual format during auto format!")

        self.handle_group(field, tuple(text), True)
783618
def atIndices(indexable, indices, default=__unique):
    
    """
    if default is __unique:
        return [indexable[i] for i in indices]
    else:
        res = []
        for i in indices:
            try:
                res.append(indexable[i])
            except (IndexError, KeyError):
                res.append(default)
        return res
26258
def formatted_param_type(ptype):
    """"""
    pt_name = ptype["name"]
    if pt_name.startswith("<byname>"):
        pt_name = pt_name.replace("<byname>[", "=> ")[:-1]
    elif pt_name.startswith("<repeated>"):
        pt_name = pt_name.replace("<repeated>[", "")[:-1] + "*"
    return pt_name
509355
def _make_index(df, cols=META_IDX):
    """"""
    return pd.MultiIndex.from_tuples(
        pd.unique(list(zip(*[df[col] for col in cols]))), names=tuple(cols))
63772
def asindices(hdr, spec):
    """"""

    flds = list(map(text_type, hdr))
    indices = list()
    if not isinstance(spec, (list, tuple)):
        spec = (spec,)
    for s in spec:
        # spec could be a field index (takes priority)
        if isinstance(s, int) and s < len(hdr):
            indices.append(s)  # index fields from 0
        # spec could be a field
        elif s in flds:
            indices.append(flds.index(s))
        else:
            raise FieldSelectionError(s)
    return indices
910838
def format_dimension(dimension):
        """"""
        result = ""
        if "type" in dimension.attrib:
            result += "[R" if dimension.attrib["type"] == "row" else "[C"
        else:
            result += "[C"
        if "index" in dimension.attrib:
            result += ":" + dimension.attrib["index"]

        result += "] " + re.sub("\s+", " ", dimension.text.replace("\n", " "))
        return result
269778
def format_rows(row, center, fullrange=None, interquartile=None,
                custom_format='{:.2f}'):
    """"""
    if (fullrange or 0) + (interquartile or 0) == 1:
        legend = '{} ({})'.format(center, 'max, min' if fullrange is True
                                  else 'interquartile range')
        index = row.index.droplevel(2).drop_duplicates()
        count_arg = dict(tuples=[('count', '')], names=[None, legend])
    else:
        msg = 'displaying multiple range formats simultaneously not supported'
        raise NotImplementedError(msg)

    ret = pd.Series(index=pd.MultiIndex.from_tuples(**count_arg).append(index))

    row = row.sort_index()
    center = '50%' if center == 'median' else center

    # get maximum of `count` and write to first entry of return series
    count = max([i for i in row.loc[(slice(None), slice(None), 'count')]
                 if not np.isnan(i)])
    ret.loc[('count', '')] = ('{:.0f}'.format(count)) if count > 1 else ''

    # set upper and lower for the range
    upper, lower = ('max', 'min') if fullrange is True else ('75%', '25%')

    # format `describe()` columns to string output
    for i in index:
        x = row.loc[i]
        _count = x['count']
        if np.isnan(_count) or _count == 0:
            s = ''
        elif _count > 1:
            s = '{f} ({f}, {f})'.format(f=custom_format)\
                .format(x[center], x[upper], x[lower])
        elif _count == 1:
            s = '{f}'.format(f=custom_format).format(x['50%'])
        # add count of this section as `[]` if different from count_max
        if 0 < _count < count:
            s += ' [{:.0f}]'.format(_count)
        ret.loc[i] = s

    return ret
1212313
def _normalize_index(self, index, pipe=None):
        """"""
        pipe = self.redis if pipe is None else pipe
        len_self = self.__len__(pipe)
        positive_index = index if index >= 0 else len_self + index

        return len_self, positive_index
416143
def children_types( record, index, key='refs', stop_types=STOP_TYPES ):
    """"""
    types = {}
    for child in children( record, index, key, stop_types=stop_types ):
        types.setdefault(child['type'],[]).append( child )
    return types