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

VSN columns does not work with pandas index #41

Open
aretaon opened this issue Apr 11, 2024 · 0 comments
Open

VSN columns does not work with pandas index #41

aretaon opened this issue Apr 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@aretaon
Copy link
Contributor

aretaon commented Apr 11, 2024

Describe the bug
When supplying a pandas column index for pp.vsn column, the UID string is appended to all col names instead of being added to the list.

To Reproduce

pg, s1_cols = pp.vsn(
    pg,
    pg.filter(regex="^sum_iBAQ.*S1_R\d+_median_corrected$").columns,
    return_cols=True,
)

returns

KeyError: "None of [Index(['sum_iBAQ TPA_S1_R1_median_correctedUID',\n 'sum_iBAQ WT_S1_R1_median_correctedUID',\n 'sum_iBAQ WT_S1_R2_median_correctedUID',\n 'sum_iBAQ WT_S1_R3_median_correctedUID',\n 'sum_iBAQ TPA_S1_R2_median_correctedUID',\n 'sum_iBAQ TPA_S1_R3_median_correctedUID'],\n dtype='object')] are in the [columns]"

Expected behavior
There should be an error when calling vsn with the wrong column dtype indicating to supply a list.

@aretaon aretaon added the enhancement New feature or request label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant