Skip to content

Use the pivot table directly for taxa#1269

Merged
jonbrenas merged 5 commits intomasterfrom
GH1268-plot_samples_interactive_maps_bug_on_colonies
Apr 3, 2026
Merged

Use the pivot table directly for taxa#1269
jonbrenas merged 5 commits intomasterfrom
GH1268-plot_samples_interactive_maps_bug_on_colonies

Conversation

@jonbrenas
Copy link
Copy Markdown
Collaborator

Addresses #1268

@adilraza99
Copy link
Copy Markdown
Contributor

Hi @jonbrenas, really nice fix. Deriving taxa from the pivot table makes the data flow much more consistent and resolves the mismatch cleanly.

One small non-blocking thought: if we capture taxa from df_pivot.columns right after the pivot, before merging with df_location_aggs, we could skip the exclusion list and the int() cast. The merge is what introduces those non-taxa columns and the float dtype. Totally optional since the current approach works fine.

Also, would it be worth adding a small regression test for this scenario (samples with no location data or colony-only datasets)? Happy to put one together if that would help.

@jonbrenas
Copy link
Copy Markdown
Collaborator Author

I think you are right. I don't think the tests are needed, though.

@jonbrenas jonbrenas merged commit eb5bdaf into master Apr 3, 2026
8 checks passed
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.

2 participants