docs: def sparse(csv, sparse):
      ''' Convert a CSV file to a sparse matrix with rows and column names
      saved as companion files.
      '''
      import pandas as pd
      df = pd.read_csv(csv, index_col=0, header=0)
      pd.Series(df.index).to_csv(sparse + ".rownames", index=False)
      pd.Series(df.columns.values).to_csv(sparse + ".colnames", index=False)
      with open(sparse, "w+b") as out_handle:
          scipy.io.mmwrite(out_handle, scipy.sparse.csr_matrix(df))