Pandas Integration
Pandas is a popular Python library for data analysis and manipulation.
Install pandas:
pip install pandasDataFrame
The primary integration point is the DataFrame,
a two-dimensional tabular data structure similar to a spreadsheet or SQL
table. Once pandas is installed, Novant result objects expose a
to_dataframe() method that converts API responses directly
into DataFrames.
Values
To convert live values to a DataFrame, call
to_dataframe() on a ValueList:
df = client.values(source_id="s.2").to_dataframe()The resulting DataFrame has one row per point with three
columns:
| Column | Type | Description |
|---|---|---|
id |
str |
Point ID |
val |
float |
Current value (non-numeric coerced to NaN) |
status |
str |
Point status |
Trends
To convert trend data to a DataFrame, Call
to_dataframe() on a TrendData:
ids = ["s.2.4", "s.2.5"]
df = client.trends(point_ids=ids, date="2026-03-09").to_dataframe()The resulting DataFrame uses ts as a
DatetimeIndex, with one column per point ID. Unavailable
values ("na") are coerced to NaN, and all
value columns are cast to float.
| Column | Type | Description |
|---|---|---|
ts (index) |
DatetimeIndex |
Timestamp for each interval |
s.2.4 |
float |
Value for each requested point ID |
s.2.5 |
float |
(one column per point, named by ID) |