Creating a sparse matrix to densify it is very inefficient. You should do something like:
<pre>
pvals_mat = np.zeros(shape=(n_regressors, n_descriptors))
pvals_mat[score_orig_data['x_id'], score_orig_data['y_id']] = -np.log10(pvals)
</pre>