Skip to main content
Committed ⭐️⭐️
August 9, 2026
Gathering Interest

Data types when listing instances

Related products:Data ModelingPython SDK
  • August 9, 2026
  • 2 replies
  • 40 views

When listing instances of a view and using the to_pandas method, is there a simple way to use the data types defined on the container properties and use these to cast to similar python data types? Or could this be an option of the python SDK?

In the classical CDF data types, this is implemented so that for example a date field and timestamp fields have the correct python data type. The data modelling instances will be either floats or string. It would be very convenient if the underlying container data type can be used so that you do not have to manually cast values in the pandas dataframe.

2 replies

Practitioner ⭐️⭐️⭐️
August 10, 2026

Take a look at TypedNode (or -Edge) we support in the SDK. It requires some “manual setup” (one time) then gives you correct types + attribute based access. Check out the example “class Person(TypedNode)”, e.g. here:

https://cognite-sdk-python.readthedocs-hosted.com/en/latest/generated/cognite.client.AsyncCogniteClient.data_modeling.instances.retrieve_nodes.html#cognite.client.AsyncCogniteClient.data_modeling.instances.retrieve_nodes

Besides that - I agree with your point about using the available type info. Will have a chat with the team 👍

Mithila Jayalath
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
August 10, 2026

@Johan Dahl I’ll convert this question into a product idea.