Skip to main content

How to use Python packages

This guide discusses how to use Python packages with Deephaven. To learn how to install these packages, see our guide How to install Python packages.

Once a package is installed, it can be imported and used like any other Python package. For an index of available Python packages and for more information on Python packages, visit the Python Package Index.

Use packages in query strings

Installed Python packages can be used in query strings. Let's use the Pendulum package, which we installed in the guide How to install Python packages.

import pendulum
from deephaven.TableTools import timeTable

def get_paris_time():
return pendulum.now("Europe/Paris")

times_in_paris = timeTable("00:00:05").update("Paris = get_paris_time()")