Follow and bound larger investigations
Do you need availability and possible mappings before exploring browsing paths?
Use df and fw from Getting started to request just those
two sections. The same controls apply to a larger dataframe you load yourself.
Choose the work
Section titled “Choose the work”focused = fw.explore( df, sections=["missingness", "dependencies"], options={ "dependencies": { "features": ["exam", "site"], "include_grain": False, "limits": {"max_candidates": 2, "max_dependency_tests": 2}, } }, progress=True,)The progress display reports each phase, its completed work and elapsed time. On
this small example it finishes quickly. Work budgets go in each section’s
limits; budgets you leave out keep the overview’s defaults. The dependency
budget counts tests, not rows; all eligible rows participate in each completed
test. Graph work is skipped explicitly. Other
sections are marked not_requested, so their absence is not a negative finding.
Read the section’s evidence using the same result methods as a standalone analysis:
dependency_section = focused.section("dependencies")candidate_coverage = dependency_section.to_frame("candidates")print( candidate_coverage[ ["columns", "global_targets_tested", "global_targets_possible"] ].to_string(index=False))columns global_targets_tested global_targets_possible [exam] 1 1 [site] 1 1Each candidate had one possible target and both tests completed. With more
features or a smaller budget, an untested target stays unknown. min_accuracy
controls which findings are reported, not how many tests run.
Stop cooperatively
Section titled “Stop cooperatively”Pass timeout=60 to ask an analysis to stop after a minute. Handle cancellation
when you want to choose smaller budgets and try again:
try: bounded = fw.explore(df, sections=["missingness"], timeout=60)except fw.AnalysisCancelled: print("Analysis stopped; choose a smaller set of questions and retry.")Cancellation occurs between work items; a running pandas or NumPy operation must
finish first. A cancelled call raises an exception instead of returning a partial
result. For an interactive application, use fw.CancellationToken and a progress
callback as described in runtime controls.
Save the evidence
Section titled “Save the evidence”import json
saved_json = json.dumps(focused.to_dict(), allow_nan=False)restored = fw.Result.from_dict(json.loads(saved_json))Saved results keep every measurement. Findings and grain views store at most
example_limit source positions each (a budget in limits), so a saved result
does not grow with the number of rows for those records. To keep exports small on wide tables, narrow
features and the candidate and pair budgets rather than the rows.