Skip to main content
Answer

Cognite function with pandas

  • July 12, 2023
  • 1 reply
  • 66 views

Forum|alt.badge.img

Hi, when I create a function that imports pandas I get  ModuleNotFoundError: No module named 'pandas'

I expected that the function was hosted in a pre-configured runtime environment with many commonly used libraries already installed, including pandas.

Any idea what I am doing wrong?

Best answer by Chyrus Ramesh

Hi @czach ,

The Cognite-SDK no longer provides pandas by default. It can be installed using cognite-sdk[pandas] . Specifying that in the requirements.txt will able to fix this issue.

Thank you.

Best regard,

Chyrus

1 reply

Forum|alt.badge.img
  • Practitioner
  • Answer
  • July 13, 2023

Hi @czach ,

The Cognite-SDK no longer provides pandas by default. It can be installed using cognite-sdk[pandas] . Specifying that in the requirements.txt will able to fix this issue.

Thank you.

Best regard,

Chyrus