Public API
Use import fieldwork as fw. The signatures below are generated from the documented implementation. Discovery functions return InvestigationResult; suggest_paths returns PathResult; foundational analyses return ExplorerResult. All accept pandas dataframes and preserve source values.
| Need | Operation |
|---|---|
| Compact orientation | explore |
| Availability and entity summaries | missingness |
| Candidate grain and approximate/conditional mappings | discover_dependencies |
| Browsing order | suggest_paths |
| String, numeric and indexed-family evidence | value_patterns |
| Independent counts / ordered prefixes | levels / census |
| Supplied candidate exact grain | grain |
| Associations and absence / selected joint counts | pairs / joint_counts |
| Role proposals | infer_schema |
| Saved evidence export | render_plaintext, render_svg, render_html, visualization_data |
| Availability deltas | compare |
See results and configuration for contracts and guides for complete workflows. All budgets in these signatures are independent of the input row population unless an explicit scope or foundation preselection mode is used.
explore
Section titled “explore”fw.explore(df, dimensions=None, *, discovery=None, **options)missingness
Section titled “missingness”fw.missingness(df, *, features=None, by=None, entity=None, unit='rows', entity_presence='any', missing=None, scope=None, table_id='table', min_implication=0.9, min_similarity=0.8, max_pairs=200, max_signatures=50, max_contexts=32, example_limit=5)discover_dependencies
Section titled “discover_dependencies”fw.discover_dependencies(df, *, features=None, max_key_size=2, max_candidates=100, min_accuracy=0.95, by=None, max_contexts=32, dropna=True, scope=None, missing=None, table_id='table', example_limit=5)suggest_paths
Section titled “suggest_paths”fw.suggest_paths(df, *, objective='structure', features=None, start_with=None, before=None, exclude=None, target=None, max_dimensions=4, max_candidates=200, max_features=20, max_pairs=200, beam_width=12, n_paths=3, display_budget=40, scope=None, missing=None, table_id='table')value_patterns
Section titled “value_patterns”fw.value_patterns(df, *, features=None, by=None, missing=None, scope=None, table_id='table', max_pairs=100, max_patterns=10, example_limit=5)levels
Section titled “levels”fw.levels(df: 'pd.DataFrame', features: 'Iterable[Any] | None' = None, *, top_n: 'int | None' = None, max_levels: 'int | None' = 100, min_count: 'int' = 1, dropna: 'bool' = False, schema: 'dict[Any, str] | None' = None, engine_metadata: 'bool' = False, scope_metadata: 'dict[str, Any] | None' = None) -> 'ExplorerResult'census
Section titled “census”fw.census(df, dimensions, *, scope=None, missing=None, table_id='table', **options)fw.grain(df: 'pd.DataFrame', candidate_keys: 'Iterable[Any]', *, dropna: 'bool' = False, schema: 'dict[Any, str] | None' = None, engine_metadata: 'bool' = False, scope_metadata: 'dict[str, Any] | None' = None) -> 'ExplorerResult'fw.pairs(df: 'pd.DataFrame', dimensions: 'Iterable[Any]', *, dropna: 'bool' = False, include_absence: 'bool' = False, reference_domains: 'Mapping[Any, Iterable[Any]] | None' = None, pair_contexts: 'Iterable[Mapping[Any, Any]] | None' = None, max_absence_cells: 'int | None' = 1000, max_contexts: 'int | None' = 32, max_pairs: 'int | None' = 15, scope_metadata: 'dict[str, Any] | None' = None) -> 'ExplorerResult'joint_counts
Section titled “joint_counts”fw.joint_counts(df: 'pd.DataFrame', dimensions: 'Iterable[Any]', *, context: 'Mapping[Any, Any] | None' = None, dropna: 'bool' = False, max_cells: 'int' = 2500) -> 'ExplorerResult'infer_schema
Section titled “infer_schema”fw.infer_schema(df: 'pd.DataFrame', candidate_keys: 'Iterable[Any] | None' = None) -> 'ExplorerResult'render_plaintext
Section titled “render_plaintext”fw.render_plaintext(result, *, width=100, max_lines=200, max_nodes=1000, detail='full', missing_label='<NA>', unicode_mode='safe')render_svg
Section titled “render_svg”fw.render_svg(result, *, section=None, detail='full', view=None, show_exceptions=False, max_findings=12)render_html
Section titled “render_html”fw.render_html(result, *, section=None, detail='full', max_findings=100)visualization_data
Section titled “visualization_data”fw.visualization_data(result, *, section=None, detail='full')compare
Section titled “compare”fw.compare(before, after)