Dask DataFrame is composed of many smaller Pandas DataFrames that are split row-wise along the index. An operation on a single Dask DataFrame triggers many operations on the Pandas DataFrames that constitutes it. Transforming dataframe to **sparse matrix** and reset index n = norm (X) returns the 2-norm or maximum singular value of **matrix** X , which is approximately. 要在稀疏矩阵和向量之间进行向量乘积，只需使用矩阵 dot 方法，如其文档字符串中所述：. >>> import numpy as np >>> from **scipy.sparse** import csr_matrix >>> A = csr_matrix( [ [1, 2, 0], [0, 0, 3], [4, 0, 5]]) >>> v = np.array( [1, 0, -1]) >>> A.dot(v) array ( [ 1, -3, -1], dtype=int64) 警告. 从NumPy 1.7开始.