If you have a very large CSR matrix, this approach may be slow. Here is the python code to save CSR matrix to a CSV file.
import numpy as np
from scipy.sparse import csr_matrix
import pandas as pd
# create a test CSR matrix
r = np.array([0, 0, 1, 1, 2, 2, 2, 3, 4, 4, 5, 6, 6])
c = np.array([0, 3, 4, 1, 3, 5, 6, 3, 1, 6, 0, 1, 3])
data = np.array([1]*len(r))
X = csr_matrix((data, (r, c)), shape=(7, 7))
# save CSR matrix as csv
df = pd.DataFrame(csr_matrix.todense(X))
csv_file = "test_csv_file.csv"
print("Write data to a CSV file", csv_file)
df.to_csv(csv_file, index=False, header=None)