Skip to main content
Committed ⭐️⭐️
Jul 12, 2023 12:52 PM UTC
Solved

Cognite function with pandas

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?

Practitioner ⭐️⭐️⭐️
Jul 13, 2023 8:01 AM UTC

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

Practitioner ⭐️⭐️⭐️
Jul 13, 2023 8:01 AM UTC

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