From b786d9cf6a7eeb7428d67ba596beacc815e1659c Mon Sep 17 00:00:00 2001 From: Shiv Munagala <104731185+ShivMunagala@users.noreply.github.com> Date: Thu, 18 Apr 2024 22:03:40 +0100 Subject: [PATCH] fix: Code block not rendering Code block under the subtitle 'Stacked Bar Chart From Aggregating a DataFrame' wasn't rendering because language declaration for the block was missing. --- doc/python/bar-charts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/bar-charts.md b/doc/python/bar-charts.md index 635a348d241..7134ab2c68f 100644 --- a/doc/python/bar-charts.md +++ b/doc/python/bar-charts.md @@ -307,8 +307,8 @@ fig.show() ### Stacked Bar Chart From Aggregating a DataFrame Stacked bar charts are a powerful way to present results summarizing categories generated using the Pandas aggregate commands. `pandas.DataFrame.agg` produces a wide data set format incompatible with `px.bar`. Transposing and updating the indexes to achieve `px.bar` compatibility is a somewhat involved option. Here is one straightforward alternative, which presents the aggregated data as a stacked bar using plotly.graph_objects. -``` +```python from plotly import graph_objects as go import pandas as pd