Skip to main content
Answer

Cognite ML: Data Modeling Hands-on Lab

  • January 17, 2023
  • 2 replies
  • 113 views

Adam Gunther
Active
Forum|alt.badge.img

I am attempting to run the python file associated with the Data Modeling hands-on lab (https://colab.research.google.com/drive/11NdrGUzFhbwsOlKqXVfYRqu9s1DzAw4b?usp=sharing). I am receiving the same error every time the ‘plot’ function is called:

 

TypeError: Cannot interpret '<attribute 'dtype' of 'numpy.generic' objects>' as a data type”.

 

After some debugging, the data seems to be in a dataframe data type. I suspect there is some version discrepancy between numpy and pandas, has anyone else seen this error?

 

Thank you,

 

Adam

Best answer by Viraj Dhanusha

Hi @Adam Gunther 

I’m Viraj from Cognite support and thank you for reporting  issues in Cognite Hub. 

 I could not see that this error was reported before for Cognite support.

Unfortunately I could not reproduce your issue but it seems that the issue is related to the some version discrepancy between numpy and pandas as you mentioned. With the latest versions, the code ran successfully. 

Can you please upgrade both the numpy and pandas to the latest versions and try to proceed?

You can use 

pip install numpy --upgrade

!pip3 install --upgrade pandas

Best regards, 
Viraj

2 replies

Madina Kholmatova
Seasoned Practitioner
Forum|alt.badge.img+7

Hi @Adam Gunther

I have created a support ticket regarding this issue, and the team will reach out to you as soon as possible. 

Best regards,
Madina


Forum|alt.badge.img+1
  • Practitioner
  • Answer
  • January 20, 2023

Hi @Adam Gunther 

I’m Viraj from Cognite support and thank you for reporting  issues in Cognite Hub. 

 I could not see that this error was reported before for Cognite support.

Unfortunately I could not reproduce your issue but it seems that the issue is related to the some version discrepancy between numpy and pandas as you mentioned. With the latest versions, the code ran successfully. 

Can you please upgrade both the numpy and pandas to the latest versions and try to proceed?

You can use 

pip install numpy --upgrade

!pip3 install --upgrade pandas

Best regards, 
Viraj