#create NumPy array for 'blocks'
blocks = np.array([2, 3, 1, 0, 2, 7, 8, 2])
#add 'blocks' array as new column in DataFrame
df['blocks'] = blocks.tolist()
import numpy as np
import pandas as pd
import scipy.sparse as sparse
df = pd.DataFrame(np.arange(1,10).reshape(3,3))
arr = sparse.coo_matrix(([1,1,1], ([0,1,2], [1,2,0])), shape=(3,3))
df['newcol'] = arr.toarray().tolist()
print(df)