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

Don't assume df_barcodes has empty column #267

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

watronfire
Copy link

Fixes #266

Wraps the drop statement in a conditional, so that a KeyError isn't raised if the dataframe doesn't have a column named ''.

Alternatively, the pandas.DataFrame.drop function has an errors parameter which can be set to ignore so that an error isn't raised when attempting to drop a non-existant column, but that seems like it could cause some headaches in the future.

@joshuailevy
Copy link
Collaborator

Awesome, thanks Nate!! @mariaelf97 has been working on some related updates to this function actually - we'll get this incorporated shortly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

KeyError raised when extracting barcodes from custom PB tree.
2 participants