AttributeError: 'Series' object has no attribute 'as_matrix' code example Example: AttributeError: 'Series' object has no attribute 'toarray' df[i].values.tolist()