data argument can’t be an iterator

 b = map(ct,data.as_matrix())

data = pd.DataFrame(b).fillna(0)
Traceback (most recent call last):

  File "<ipython-input-47-48b397cc2c53>", line 1, in <module>
    data = pd.DataFrame(b).fillna(0)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\frame.py", line 389, in __init__
    raise TypeError("data argument can't be an iterator")

TypeError: data argument can't be an iterator

Reason: Elements in a dataframe cannot be iterative.

b = map(ct,data.as_matrix())
c = list(b)
data = pd.DataFrame(c).fillna(0)

Read More: