-
Notifications
You must be signed in to change notification settings - Fork 0
Dataframes and Parquet
github-actions[bot] edited this page Oct 1, 2026
·
1 revision
ntpstats needs only numpy. Adapters for the data-science stack are optional and are loaded only when used:
pip install "ntpstats[data]" # pandas, pyarrow, xarrayfrom ntpstats import load_one
from ntpstats.series import TimeSeries
from ntpstats.stability import compute, dynamic
s = load_one("/var/log/chrony/tracking.log")
df = s.to_pandas() # UTC DatetimeIndex; offset + extra columns; metadata in df.attrs
df["offset"].rolling("1h").std().plot()
s2 = TimeSeries.from_pandas(df) # back (or any DataFrame: offset=..., time=..., negate=...)
r = compute(s.offset, 16.0, "oadev")
r.to_dataframe() # tau, dev, lo, hi, edf, alpha, noise, n
dynamic(s, "oadev", window=86400).to_xarray() # (time, tau) DataArray for heat maps
s.to_parquet("tracking.parquet") # float64 columns + metadata; every command reads it backntpstats convert big.log --to parquet -o big.parquet # compact, exact, fast to reload
ntpstats stability big.parquet -k oadev,tdevThe package ships a py.typed marker, so type checkers see ntpstats' annotations.
ntpstats
- Home
- Getting started
- CLI reference
- In your browser
- Input formats
- Statistics
- Network & estimators
- Trace replay & PTP chains
- PTP & time error
- Sources & bounds
- Audit, events & CI
- Monitoring
- Protocols
- Metrology
- Research data
- Dataframes & Parquet
- Writing a plugin
- Notebooks & gallery
- Validation
- API reference
- Live interop
- State of the art
- Tools landscape
- Changelog
- Roadmap