@staticmethod
def _columns_index_to_name(columns, idxdict):
    """
        Substitutes column indexes with column names, return the passed list of columns
        as a list of names only.

        :param columns:
        :type columns: list
        :param idxdict:
        :type idxdict: dict
        :return:
        :rtype: list
        """
    res = []
    for col in columns:
        if type(col) is int:
            assert 0 <= col < len(idxdict
                ), "Column index '%s' out of range" % col
            res.append(idxdict[col])
        else:
            res.append(col)
    return res
