-
Notifications
You must be signed in to change notification settings - Fork 2
Quickstart
Iman edited this page Jun 21, 2026
·
1 revision
Everything in tsauditor goes through a single entry point:
import tsauditor as tsa
report = tsa.scan(df, target="Direction", domain="finance")scan() returns a GuardReport object. From there, you decide what to do with the findings.
import pandas as pd
import tsauditor as tsa
# Load your time-series DataFrame
df = pd.read_csv("data.csv", index_col="Date", parse_dates=True)
# Run the audit
report = tsa.scan(df, target="Direction", domain="finance")
# Print a formatted summary to the terminal
report.summary()If your datetime column isn't already the index, pass it via time_col:
report = tsa.scan(df, target="Direction", time_col="Date", domain="finance")report.summary()Prints a colour-coded table showing every issue found, grouped by severity, with suggested actions below.
# Issues that block modeling — fix these first
report.critical
# Issues worth reviewing
report.warnings
# Informational findings
report.info
# All issues, sorted by severity
report.all_issues# All leakage issues
report.filter(module="leakage")
# Specific issue code
report.filter(code="LEK001")
# All critical issues from the profiler
report.filter(module="profiler", severity="critical")# Returns a list of column names to review or remove
report.leaky_columns()report.to_json("report.json")The JSON file contains the full issue list with evidence and suggested actions, suitable for logging in automated pipelines.
import pandas as pd
import tsauditor as tsa
df = pd.read_csv("sensor_log.csv", index_col="timestamp", parse_dates=True)
# No target needed for structural + anomaly checks only
report = tsa.scan(df, domain="sensor")
report.summary()Run only the checks you need:
# Only structural profiling, skip anomaly and leakage
report = tsa.scan(df, run_anomaly=False, run_leakage=False)
# Only leakage detection
report = tsa.scan(df, target="label", run_profiler=False, run_anomaly=False)- How It Works — understand what each module is checking
- Issue Code Reference — look up any specific issue code
- Domain Presets — understand finance vs sensor threshold differences