KDB-X conversion considerations

This page provides details on data types and conversions in PyKX.

PyKX attempts to make conversions between q and Python as seamless as possible. However due to differences in their underlying implementations there are cases where 1 to 1 mappings are not possible.

Data types and conversions

The key PyKX APIs around data types and conversions are outlined under:

Text representation in PyKX

Handling and converting text in PyKX requires consideration as there are some key differences between the Symbol and Char data types.

Nulls and infinities

Most q data types have the concepts of null, negative infinity, and infinity. Python does not have the concept of infinities and it's null behavior differs in implementation. The page handling nulls and infinities details the needed considerations when dealing with these special values.

Temporal data types

Converting temporal data types in PyKX involves handling timestamp/datetime types and duration types, each with specific considerations due to differences in how Python and q (the language used by kdb+) represent these data types.