AttributeError: 'numpy.ndarray' object has no attribute 'toList' AttributeError: 'numpy.ndarray' object has no attribute 'toList' arrays arrays

AttributeError: 'numpy.ndarray' object has no attribute 'toList'


The method name is all lowercase: tolist.

So you need to change the offending line to:

x.append(df.values.tolist())