Sparse matrices with named rows and columns (Python)