Skip to content

fix(pptx): render missing chart data points as empty cells, not None - #2758

Open
zhouh (OUAO-FRANK) wants to merge 1 commit into
microsoft:mainfrom
OUAO-FRANK:fix/2526-pptx-missing-point
Open

zhouh (OUAO-FRANK) wants to merge 1 commit into
microsoft:mainfrom
OUAO-FRANK:fix/2526-pptx-missing-point

Conversation

@OUAO-FRANK

Copy link
Copy Markdown

Summary

_convert_chart_to_markdown built each Markdown row with map(str, row), so a None data point (a missing value in a chart series) became the literal string "None" in the output table — indistinguishable from a value actually named "None".

The fix renders None as an empty cell, so a missing point reads as empty in every downstream consumer.

Testing

Added test_pptx_chart_missing_data_point_renders_empty, which builds a chart with a (1.0, None, 3.0) series and asserts the missing point renders as | Q2 | | with no literal "None" in the output. It fails on the previous code (| Q2 | None |) and passes now.

$ python -m pytest packages/markitdown/tests/test_pptx.py
50 passed

Fixes #2526.

_convert_chart_to_markdown joined map(str, row), so a None data point became
the literal string "None" in the Markdown table. Render None as an empty cell
so a missing value is not mistaken for a value named None downstream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pptx: missing chart data points render as the literal string "None"

1 participant