AttributeError: ‘numpy.ndarray’ object has no attribute ‘toList’ August 24, 2023 by Tarik The method name is all lowercase: tolist. So you need to change the offending line to: x.append(df.values.tolist())