Skip to content

Commit

Permalink
Use Q1, Median, Q3 conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
roblim committed Jul 3, 2019
1 parent 6668f1f commit 0ba83a7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion great_expectations/render/renderer/column_section_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,18 @@ def _render_quantile_table(cls, evrs, content_blocks):
quantiles = quantile_evr["result"]["observed_value"]["quantiles"]
quantile_ranges = quantile_evr["result"]["observed_value"]["values"]

quantile_strings = {
.25: "Q1",
.75: "Q3",
.50: "Median"
}

for idx, quantile in enumerate(quantiles):
table_rows.append([f'{int(quantile * 100)}-th', quantile_ranges[idx]])
quantile_string = quantile_strings.get(quantile)
table_rows.append([
quantile_string if quantile_string else f'{int(quantile * 100)}-th',
quantile_ranges[idx]
])

content_blocks.append({
"content_block_type": "table",
Expand Down

0 comments on commit 0ba83a7

Please sign in to comment.