DataFrame constructor not properly called

The pd.DataFrame constructor does not accept a dictionary view as data. You can convert to list instead. Here’s a minimal example: The docs do suggest this: data : numpy ndarray (structured or homogeneous), dict, or DataFrame Equivalently, you can use pd.DataFrame.from_dict, which accepts a dictionary directly:

Convert pandas dataframe to NumPy array

df.to_numpy() is better than df.values, here’s why.* It’s time to deprecate your usage of values and as_matrix(). pandas v0.24.0 introduced two new methods for obtaining NumPy arrays from pandas objects: to_numpy(), which is defined on Index, Series, and DataFrame objects, and array, which is defined on Index and Series objects only. If you visit the v0.24 docs for .values, you will see a big red warning that says: Warning: We recommend … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)