The method name is all lowercase: tolist.

So you need to change the offending line to:

x.append(df.values.tolist())
Answer from MSeifert on Stack Overflow
🌐
NumPy
numpy.org › doc › 2.2 › reference › generated › numpy.ndarray.tolist.html
numpy.ndarray.tolist — NumPy v2.2 Manual
ndarray.tolist()# Return the array as an a.ndim-levels deep nested list of Python scalars. Return a copy of the array data as a (nested) Python list. Data items are converted to the nearest compatible builtin Python type, via the item function. If a.ndim is 0, then since the depth of the nested list is 0, it will not be a list at all, but a simple Python scalar. Parameters: none · Returns: yobject, or list of object, or list of list of object, or …
🌐
SciPy
docs.scipy.org › doc › numpy-1.13.0 › reference › generated › numpy.ndarray.tolist.html
numpy.ndarray.tolist — NumPy v1.13 Manual
June 10, 2017 - >>> a = np.array([1, 2]) >>> a.tolist() [1, 2] >>> a = np.array([[1, 2], [3, 4]]) >>> list(a) [array([1, 2]), array([3, 4])] >>> a.tolist() [[1, 2], [3, 4]]
🌐
CSDN
devpress.csdn.net › python › 6304c8997e6682346619ca58.html
AttributeError: 'numpy.ndarray' object has no attribute 'toList'_list_Mangs-Python
The method name is all lowercase: tolist. ... 问题:如何重塑熊猫。系列 在我看来,它就像 pandas.Series 中的一个错误。 a = pd.Series([1,2,3,4]) b = a.reshape(2,2) b b 有类型 Series 但无法显示,最后一条语句给出异常,非常冗长,最后一行是“TypeError: %d format: a number is required, not numpy.ndarray”。 b.sha
🌐
NumPy
numpy.org › doc › stable › reference › generated › numpy.ndarray.tolist.html
numpy.ndarray.tolist — NumPy v2.4 Manual
ndarray.tolist()# Return the array as an a.ndim-levels deep nested list of Python scalars. Return a copy of the array data as a (nested) Python list. Data items are converted to the nearest compatible builtin Python type, via the item method. If a.ndim is 0, then since the depth of the nested list is 0, it will not be a list at all, but a simple Python scalar. Parameters: none · Returns: yobject, or list of object, or list of list of object, or …
🌐
HatchJS
hatchjs.com › home › numpy ndarray object has no attribute ‘to_list’: how to fix this error
Numpy ndarray object has no attribute 'to_list': How to fix this error
January 5, 2024 - Q: What does it mean when I get ... A: This error message means that you are trying to use the `to_list()` method on a NumPy array, but this method does not exist for NumPy arrays....
🌐
GitHub
github.com › pandas-dev › pandas › issues › 41134
BUG: AttributeError: 'StringArray' object has no attribute 'tolist' · Issue #41134 · pandas-dev/pandas
April 24, 2021 - import pandas as pd import numpy as np lzt = ["a","b","c"] arr = np.array(lzt) df = pd.DataFrame(arr).astype('string') srs = df[0] u = srs.unique() type(u) <class 'pandas.core.arrays.string_.StringArray'> u.dtype == 'string' True u.tolist() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'StringArray' object has no attribute 'tolist' So I tried changing my code to use list(srs.unique()), but then all of my numeric dtypes become unserializable for JSON.
Author   aiqc
🌐
GitHub
github.com › pydata › xarray › issues › 3215
decode_cf called on mfdataset throws error: 'Array' object has no attribute 'tolist' · Issue #3215 · pydata/xarray
August 14, 2019 - Traceback (most recent call last): ... has no attribute 'tolist' Details # Paste the output here xr.show_versions() here INSTALLED VERSIONS ------------------ commit: None python: 3.6.7 | packaged by conda-forge | (default, Jul 2 2019, 02:18:42) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 3.10.0-957.21.3.el6.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: en_AU.utf8 LANG: C LOCALE: en_AU.UTF-8 libhdf5: 1.10.4 libnetcdf: 4.6.2 · xarray: 0.12.1 pandas: 0.25.0 numpy: 1.17.0 scipy: ...
Author   aidanheerdegen
Find elsewhere
🌐
NumPy
numpy.org › doc › 2.1 › reference › generated › numpy.ndarray.tolist.html
numpy.ndarray.tolist — NumPy v2.1 Manual
ndarray.tolist()# Return the array as an a.ndim-levels deep nested list of Python scalars. Return a copy of the array data as a (nested) Python list. Data items are converted to the nearest compatible builtin Python type, via the item function. If a.ndim is 0, then since the depth of the nested list is 0, it will not be a list at all, but a simple Python scalar. Parameters: none · Returns: yobject, or list of object, or list of list of object, or …
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-fix-numpy-ndarray-object-has-no-attribute-index
How to Fix: ‘numpy.ndarray’ object has no attribute ‘index’ - GeeksforGeeks
November 28, 2021 - This error arises because numpy's float attribute has been deprecated and removed in favor of using standard Python types. In this article, we will learn how to fix "AttributeError: m ... When working with NumPy we might encounter the error ...
🌐
GitHub
github.com › mymarilyn › clickhouse-driver › issues › 218
BUG: AttributeError: 'list' object has no attribute 'tolist' when insert_dataframe with use_numpy on · Issue #218 · mymarilyn/clickhouse-driver
May 14, 2021 - BUG: AttributeError: 'list' object has no attribute 'tolist' when insert_dataframe with use_numpy on#218
Published   May 14, 2021
Author   panwenbin
🌐
NumPy
numpy.org › doc › 2.0 › reference › generated › numpy.ndarray.tolist.html
numpy.ndarray.tolist — NumPy v2.0 Manual
ndarray.tolist()# Return the array as an a.ndim-levels deep nested list of Python scalars. Return a copy of the array data as a (nested) Python list. Data items are converted to the nearest compatible builtin Python type, via the item function. If a.ndim is 0, then since the depth of the nested list is 0, it will not be a list at all, but a simple Python scalar. Parameters: none · Returns: yobject, or list of object, or list of list of object, or …
🌐
Career Karma
careerkarma.com › blog › python › python attributeerror: ‘numpy.ndarray’ object has no attribute ‘append’ solution
Python AttributeError: 'numpy.ndarray' object has no attribute 'append' Solution
December 1, 2023 - The AttributeError: ‘numpy.ndarray’ object has no attribute ‘append’ error indicates you are using the regular Python append() method to add an item to a NumPy array. Instead, you should use the numpy.append() method, which uses the ...
🌐
GitHub
gist.github.com › mattip › 2e6f05f1900eb6a9fd99
numpy test suite results after merginig numpy-1.10: FAILED (KNOWNFAIL=3, SKIP=18, errors=670, failures=113) · GitHub
March 13, 2020 - numpy test suite results after merginig numpy-1.10: FAILED (KNOWNFAIL=3, SKIP=18, errors=670, failures=113) - gist:2e6f05f1900eb6a9fd99