Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge_table does not handle merge child table header columns properly #121

Open
douglasqian opened this issue Feb 17, 2023 · 0 comments
Open
Labels
python Relates to the Python version of TRP

Comments

@douglasqian
Copy link
Contributor

douglasqian commented Feb 17, 2023

Issue

The expectation from using merge_tables is that it will convert 2 tables like this:

Headers: 
C1 C2 C3
Rows:
R1
R2

Headers: 
R3
Rows:
R4

into:

Headers: 
C1 C2 C3
Rows:
R1
R2
R3
R4

But instead the output is

Headers: 
C1 C2 C3
R3
Rows:
R1
R2
R4

This is because the headers are identified based on the existence of COLUMN_HEADER in a block's EntityTypes field and the child table's top block keep this entity type even after merging. The solution is to simply drop the this value from EntityTypes if it's there while merging.

@athewsey athewsey added the python Relates to the Python version of TRP label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Relates to the Python version of TRP
Projects
None yet
Development

No branches or pull requests

2 participants