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

Attribute Error Fix in assign.py #14

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

kylacochrane
Copy link
Collaborator

@kylacochrane kylacochrane commented Nov 7, 2024

This PR resolves ISSUE12, which caused AttributeErrors during cluster address assignment when using 2 or fewer levels in GAS version 0.1.2.

The issue occurred because data[sample_id] values could be non-strings (e.g., floats/integers), causing an AttributeError when attempting to call .split() on these numeric types.

To fix this, cluster addresses are now converted to strings before splitting by the specified delimiterto ensure compatibility regardless of the data type inferred by pandas in the format_df function of the assign.py class.

Cluster address assignment with 2 or fewer levels can now be run through gas call and has been tested locally.

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.

AttributeError in assign class with format_df function.
1 participant