Conversation
…ping track of non-consecutive forager ids. when instantiating the object, it retains the original forager ids in a new column **only if** the global_forager_id doesn't exist yet
integrating updated workflows into dev branch
Contributor
Author
|
This pull only solves the non-consecutive index when creating the Solution would be to merge using "outer" (i.e., retain all columns of both dataframes). |
dimkab
requested changes
Jun 5, 2025
docs/foraging/random-hungry-followers/sim_data/hungry_foragers_samples.dill
Show resolved
Hide resolved
Contributor
Author
|
Addressed revisions, all tests passing |
dimkab
requested changes
Jun 10, 2025
docs/foraging/random-hungry-followers/sim_data/hungry_foragers_samples.dill
Show resolved
Hide resolved
…plitting of foragers, added additional property to see if mapping is necessary, changed apply_forager_id_mapping to private function
Collaborator
|
@tommybotch looks good, can we have a tiny test for the good conscience? |
…atures into tlb-dev merging remote changes
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Contributor
Author
|
Example notebook added, tests pass -- ready for review @dimkab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addressing #163
Currently operations over the dataObj require consecutive forager indices. Given situations where subsets of foragers may be of interest (or those with missing data), the foragers may not always have consecutive indices.
Solved by adding a new column to dataObj.foragersDF that re-indexs the foragers column to be consecutive while retaining the original forager index in a new column dataObj.foragersDF.global_forager_id. This column is only created if it does not already exist in the dataframe.