Returns
        -------
        adjustments : list[dict[int -> Adjustment]]
            A list, where each element corresponds to the `columns`, of
            mappings from index to adjustment objects to apply at that index.
9434
def load_pricing_adjustments(self, columns, dts, assets):
        
        out = [None] * len(columns)
        for i, column in enumerate(columns):
            adjs = {}
            for asset in assets:
                adjs.update(self._get_adjustments_in_range(
                    asset, dts, column))
            out[i] = adjs
        return out
1238806
def _apply_columns(self, func):
        

        new_data = {col: func(series)
                    for col, series in self.items()}

        return self._constructor(
            data=new_data, index=self.index, columns=self.columns,
            default_fill_value=self.default_fill_value).__finalize__(self)
669573
public static INDArrayIndex[] adjustIndices(int[] originalShape, INDArrayIndex... indexes) {
        if (Shape.isVector(originalShape) && indexes.length == 1)
            return indexes;

        if (indexes.length < originalShape.length)
            indexes = fillIn(originalShape, indexes);
        if (indexes.length > originalShape.length) {
            INDArrayIndex[] ret = new INDArrayIndex[originalShape.length];
            System.arraycopy(indexes, 0, ret, 0, originalShape.length);
            return ret;
        }

        if (indexes.length == originalShape.length)
            return indexes;
        for (int i = 0; i < indexes.length; i++) {
            if (indexes[i].end() >= originalShape[i] || indexes[i] instanceof NDArrayIndexAll)
                indexes[i] = NDArrayIndex.interval(0, originalShape[i] - 1);
        }

        return indexes;
    }
916400
public static int[] adjust(IGrowArray gwork, int desired) {
        if (gwork == null) gwork = new IGrowArray();
        gwork.reshape(desired);
        return gwork.data;
    }
270467
def load_adjustment_values():
    """"""
    # parse XML --------------------------------------------
    thisdir = os.path.split(__file__)[0]
    prst_defs_relpath = (
        'ISO-IEC-29500-1/schemas/dml-geometries/OfficeOpenXML-DrawingMLGeomet'
        'ries/presetShapeDefinitions.xml'
    )
    prst_defs_path = os.path.join(thisdir, prst_defs_relpath)
    presetShapeDefinitions = objectify.parse(prst_defs_path).getroot()
    # load individual records into tuples to return --------
    ns = 'http://schemas.openxmlformats.org/drawingml/2006/main'
    avLst_qn = '{%s}avLst' % ns
    adjustment_values = []
    for shapedef in presetShapeDefinitions.iterchildren():
        prst = shapedef.tag
        try:
            avLst = shapedef[avLst_qn]
        except AttributeError:
            continue
        for idx, gd in enumerate(avLst.gd):
            name = gd.get('name')
            val = int(gd.get('fmla')[4:])  # strip off leading 'val '
            record = (prst, idx+1, name, val)
            adjustment_values.append(record)
    return adjustment_values
420598
def get_column_list_prefixed(self):
        
        return map(
            lambda x: ".".join([self.name, x]),
            self.columns
        )
1025226
def indexed(cls, dataset, selection):
        
        selected = list(selection.keys())
        all_scalar = all((not isinstance(sel, (tuple, slice, set, list))
                          and not callable(sel)) for sel in selection.values())
        all_kdims = all(d in selected for d in dataset.kdims)
        return all_scalar and all_kdims
440176
def load_adjustment_values(self, c):
        """"""
        # retrieve auto shape types in const_name order --------
        for mast in self:
            # retriev adj vals for this auto shape type --------
            c.execute(
                '  SELECT name, val\n'
                '    FROM adjustment_values\n'
                '   WHERE prst = ?\n'
                'ORDER BY seq_nmbr', (mast.prst,)
            )
            for name, val in c:
                mast.adj_vals.append(AdjustmentValue(name, val))
623466
def indexcol(self, col: str):
        
        try:
            self.df[col] = self.df.index.values
        except Exception as e:
            self.err(e)
            return
        self.ok("Column", col, "added from the index")
1339256
def alignXY(self):
        """"""

        # figure out what data we have and will align to
        xVals=[]
        xCols=[x for x in range(self.nCols) if self.colTypes[x]==3]
        yCols=[x for x in range(self.nCols) if self.colTypes[x]==0]
        xCols,yCols=np.array(xCols),np.array(yCols)
        for xCol in xCols:
            xVals.extend(self.colData[xCol])
        #xVals=list(np.round(set(xVals),5))
        xVals=list(sorted(list(set(xVals))))

        # prepare our new aligned dataset
        newData=np.empty(len(xVals)*self.nCols)
        newData[:]=np.nan
        newData=newData.reshape(len(xVals),self.nCols)
        oldData=np.round(self.data,5)

        # do the alignment
        for xCol in xCols:
            columnsToShift=[xCol]
            for col in range(xCol+1,self.nCols):
                if self.colTypes[col]==0:
                    columnsToShift.append(col)
                else:
                    break
            # determine how to move each row
            for row in range(len(oldData)):
                oldXvalue=oldData[row,xCol]
                if oldXvalue in xVals:
                    newRow=xVals.index(oldXvalue)
                    newData[newRow,columnsToShift]=oldData[row,columnsToShift]

        # commit changes
        newData[:,0]=xVals
        self.data=newData
        self.onex()
648298
def map_column(self, keys, func):
        
        return [[func(v) for v in self[key]] for key in keys]
689491
def _apply_adjustments(COEFFS, C_ADJ, tau_ss, mean, stddevs, sites, rup, dists,
                       imt, stddev_types, log_phi_ss, NL=None, tau_value=None):
    
    c1_dists = _compute_C1_term(C_ADJ, dists)
    phi_ss = _compute_phi_ss(
        C_ADJ, rup.mag, c1_dists, log_phi_ss, C_ADJ['mean_phi_ss']
    )

    mean_corr = np.exp(mean) * C_ADJ['k_adj'] * \
        _compute_small_mag_correction_term(C_ADJ, rup.mag, dists)

    mean_corr = np.log(mean_corr)

    std_corr = _get_corr_stddevs(COEFFS[imt], tau_ss, stddev_types,
                                 len(sites.vs30), phi_ss, NL, tau_value)

    stddevs = np.array(std_corr)

    return mean_corr, stddevs
878841
def _get_mapping_for_table(self, table):
        
        for mapping in self.mappings.values():
            if mapping["table"] == table:
                return mapping
374692
def mapping(self, kdims=None, vdims=None, **kwargs):
        ""
        if config.future_deprecations:
            self.param.warning(
                "The mapping method is deprecated and should no "
                "longer be used. Use another one of the common "
                "formats instead, e.g. .dframe, .array or .columns.")

        length = len(self)
        if not kdims: kdims = self.kdims
        if kdims:
            keys = zip(*[self.dimension_values(dim.name)
                         for dim in self.kdims])
        else:
            keys = [()]*length

        if not vdims: vdims = self.vdims
        if vdims:
            values = zip(*[self.dimension_values(dim.name)
                           for dim in vdims])
        else:
            values = [()]*length
        return OrderedDict(zip(keys, values))
398771
def mk_set_headers(self, data, columns):
        
        columns = tuple(columns)
        lens = []

        for key in columns:
            value_len = max(len(str(each.get(key, ''))) for each in data)
            # account for header lengths
            lens.append(max(value_len, len(self._get_name(key))))

        fmt = self.mk_fmt(*lens)
        return fmt
78024
def applyKeyMapping(self, mapping):
		
		for coltype, colname in zip(self.columntypes, self.columnnames):
			if coltype in ligolwtypes.IDTypes and (self.next_id is None or colname != self.next_id.column_name):
				column = self.getColumnByName(colname)
				for i, old in enumerate(column):
					try:
						column[i] = mapping[old]
					except KeyError:
						pass
931695
def _apply_backwards_compatibility(df):
    
    df.row_count = types.MethodType(lambda self: len(self.index), df)
    df.col_count = types.MethodType(lambda self: len(self.columns), df)
    df.dataframe = df