Auto-imported functions

This guide lists the Java methods that are automatically imported into a Deephaven session upon startup.

These imports, which include classes, methods, and constants, are available to use inside query strings without specifying the classpath. In the following example, the query string calls abs, which is automatically imported upon server startup.

The above source and result tables displayed side-by-side

We recommend using built-in Java methods whenever possible. Java tends to be faster than Python and using pure Java avoids language boundary crossings, resulting in better performance. Whenever a Python method has a query language equivalent, always use the query language method.

Function categories

Here is a complete list of everything that is imported automatically into the query language when a new instance of the Python IDE is started, organized by category:

CategoryDescription
BasicArray manipulation, counting, null handling, and utility functions
MathMathematical operations: abs, sum, avg, min, max, trigonometry, statistics
TimeDate and time utilities: parsing, formatting, arithmetic, time zones
LogicBoolean operations: and, or, not
ParseString-to-primitive parsing functions
SortSorting functions for arrays and vectors
SearchString matching and searching utilities
GUIColor utilities and constants for table formatting
ConstantsNull values, infinity, and numeric limits
JavaJava standard library classes (String, Integer, List, Map, etc.)
Data typesType casting and data structure utilities