Learn to Use the Cognite Python SDK > matplotlib required to plot timeseries

  • 30 January 2023
  • 1 reply
  • 37 views

Userlevel 2
Badge

Learn to Use the Cognite Python SDK > List, search, retrieve > Solution: matplotlib required to plot timeseries 

running this code provided in solution results in error: Pandas ImportError: matplotlib is required for plotting

  1. dps.to_pandas().plot()

To install:

in a terminal session run:

pip install matplotlib

 

This may be mentioned somewhere in the lab explanations and I missed it but an easy fix. 

 

 


1 reply

Userlevel 2

Hi Chris,  thank you for your post!

I want to inform that the github repo also has a requirements.txt file which you can use to install all the packages. Simply run in the folder:

pip install -r requirements.txt

 

Reply