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

Note references in index column #197

Open
rowanhemsi opened this issue Aug 18, 2022 · 2 comments
Open

Note references in index column #197

rowanhemsi opened this issue Aug 18, 2022 · 2 comments
Assignees
Labels
investigate 🔍 Needs looking into
Milestone

Comments

@rowanhemsi
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Referencing notes in the index column of data tables results in an incorrect order for the notes table, including extra blank rows.

Describe the solution you'd like
I would like to be able to reference notes in the index column of data tables using the $$reference$$ system used elsewhere in the workbook.

Describe alternatives you've considered
The guidance states that notes should be avoided in data cells for reasons of usability and machine readability. Does this include index columns? If so, this feature should not be added.

Additional context
Example usage:

column_heading var_1
Inside shop x
Street x
Outside shop x
In public entertainment[note1] x

Is note 1 allowed to be referenced where It currently is or should it sit at the column heading?

@rowanhemsi rowanhemsi added the investigate 🔍 Needs looking into label Aug 18, 2022
@rowanhemsi
Copy link
Collaborator Author

Seeking clarity regarding good practice guidance

@rowanhemsi
Copy link
Collaborator Author

Analysis Function team has confirmed that note references are acceptable in "row labels" - table columns that would be marked as indices in a GPTable. The example table above can be recreated using the existing package with the code below. Discussing exact usage with issue reporters.

import pandas as pd
import gptables as gpt

table = pd.DataFrame({
    "column_heading": [
        "Inside shop",
        "Street",
        "Outside shop",
        "In public entertainment$$ref1$$"
    ],
    "var_1": ["x", "x", "x", "x"],
})

gptable = gpt.GPTable(
    table=table,
    table_name="notes_test",
    title="Notes test",
)

notes_table = pd.DataFrame({
    "Note reference": ["ref1"],
    "Note text": ["some text"],
})

gpt.write_workbook(
    filename="notes_test.xlsx",
    sheets={"notes_test": gptable},
    notes_table=notes_table,
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate 🔍 Needs looking into
Projects
None yet
Development

No branches or pull requests

1 participant