How pytoned/polars-profiling works
Polars Profiling turns a Polars DataFrame into an interactive exploratory-analysis report, with an optional raw-statistics result or comparison of reports. The main path is input through ProfileReport and the summary engine, then report structure and presentation rendering. README capabilities include type inference, column statistics, correlations, missingness, interactions, duplicates, samples, and quality alerts. Several model and rendering internals were not excerpted; those links are shown only where the README or SOURCE INDEX supports them.
Main entry points: profile_report.py ProfileReport · report.py Report structure · variables Variable sections · polars_decorator.py DataFrame accessor
Components 25
Entry and configuration
- ProfileReport
src/polars_profiling/profile_report.py - Settings
src/polars_profiling/config.py - DataFrame accessor
src/polars_profiling/controller/polars_decorator.py
Profiling analysis
- Summary engine
src/polars_profiling/model/summarizer.py - Type inference
src/polars_profiling/model/typeset.py - Polars statistics
src/polars_profiling/model/polars - Description model
src/polars_profiling/model/description.py - Correlations
src/polars_profiling/model/correlations.py
Diagnostics and comparison
- Quality alerts
src/polars_profiling/model/alerts.py - Missing diagnostics
src/polars_profiling/model/polars/missing_polars.py - Duplicate detection
src/polars_profiling/model/polars/duplicates_polars.py - Data samples
src/polars_profiling/model/polars/sample_polars.py - Report comparison
src/polars_profiling/compare_reports.py
Report assembly
- Report structure
src/polars_profiling/report/structure/report.py - Overview section
src/polars_profiling/report/structure/overview.py - Variable sections
src/polars_profiling/report/structure/variables - Visualizations
src/polars_profiling/visualisation/plot.py
Presentation and output
- Renderable interface
src/polars_profiling/report/presentation/core/renderable.py - Presentation container
src/polars_profiling/report/presentation/core/container.py - HTML templates
src/polars_profiling/report/presentation/flavours/html/templates.py - Value formatters
src/polars_profiling/report/formatters.py - Frequency tables
src/polars_profiling/report/presentation/frequency_table_utils.py
Other components
- Analyst
- Polars DataFrame
- HTML or notebook report
Connections 28
- Analyst → ProfileReport: creates report
- Polars DataFrame → ProfileReport: provides data
- Analyst → DataFrame accessor: uses accessor
- DataFrame accessor → ProfileReport: creates report
src/polars_profiling/controller/polars_decorator.py - ProfileReport → Settings: configures analysis
src/polars_profiling/profile_report.py - ProfileReport → Type inference: infers types
src/polars_profiling/profile_report.py - ProfileReport → Summary engine: requests summary
src/polars_profiling/profile_report.py - Summary engine → Polars statistics: computes statistics
- Polars statistics → Description model: produces statistics
- ProfileReport → Description model: exposes description
src/polars_profiling/profile_report.py - ProfileReport → Correlations: includes analysis
- ProfileReport → Missing diagnostics: computes missingness
- ProfileReport → Duplicate detection: detects duplicates
- ProfileReport → Data samples: collects samples
- ProfileReport → Quality alerts: generates alerts
src/polars_profiling/profile_report.py - ProfileReport → Report structure: assembles report
src/polars_profiling/profile_report.py - Report structure → Overview section: builds overview
src/polars_profiling/report/structure/report.py - Report structure → Variable sections: builds variable sections
src/polars_profiling/report/structure/report.py - Overview section → Visualizations: requests plots
src/polars_profiling/report/structure/overview.py - Variable sections → Visualizations: requests plots
src/polars_profiling/report/structure/variables/render_categorical.py - Report structure → Presentation container: builds presentation
- Presentation container → Renderable interface: uses interface
src/polars_profiling/report/presentation/core/container.py - ProfileReport → HTML templates: renders HTML
src/polars_profiling/profile_report.py - HTML templates → Value formatters: formats values
src/polars_profiling/report/presentation/flavours/html/templates.py - Variable sections → Frequency tables: builds frequency tables
src/polars_profiling/report/structure/variables/render_categorical.py - ProfileReport → Report comparison: compares reports
src/polars_profiling/profile_report.py - ProfileReport → HTML or notebook report: exports report
- Report comparison → HTML or notebook report: exports comparison