def get_ind_market_caps(n_inds=30, weights=False):
    '\n    Load the industry portfolio data and derive the market caps\n    '
    ind_nfirms = get_ind_nfirms(n_inds=n_inds)
    ind_size = get_ind_size(n_inds=n_inds)
    ind_mktcap = (ind_nfirms * ind_size)
    if weights:
        total_mktcap = ind_mktcap.sum(axis=1)
        ind_capweight = ind_mktcap.divide(total_mktcap, axis='rows')
        return ind_capweight
    return ind_mktcap
Load the industry portfolio data and derive the market caps
def get_ind_market_caps(n_inds=30, weights=False):
    '\n    \n    '
    ind_nfirms = get_ind_nfirms(n_inds=n_inds)
    ind_size = get_ind_size(n_inds=n_inds)
    ind_mktcap = (ind_nfirms * ind_size)
    if weights:
        total_mktcap = ind_mktcap.sum(axis=1)
        ind_capweight = ind_mktcap.divide(total_mktcap, axis='rows')
        return ind_capweight
    return ind_mktcap