senorita.xi
senorita.xi

Reputation: 19

Pandas function to_numpy

From pandas documentation, I found the function to_numpy https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_numpy.html But when I tried it(the same example as in the documentation), I have: 'DataFrame' object has no attribute 'to_numpy'.

Do you know from where could be the problem?

Upvotes: 1

Views: 1698

Answers (1)

Chandan
Chandan

Reputation: 540

The attribute to_numpy() was released with pandas version 0.24.0. Please upgrade your pandas package to use this attribute.

To check the version of pandas within your IDE:

import pandas
print(pandas.__version__)

You may refer this link for upgrading pandas.

Upvotes: 2

Related Questions