This repository was archived by the owner on Nov 26, 2021. It is now read-only.
trappy/ftrace: merge primary and secondary DFs based on pivot#260
Open
joelagnel wants to merge 3 commits into
Open
trappy/ftrace: merge primary and secondary DFs based on pivot#260joelagnel wants to merge 3 commits into
joelagnel wants to merge 3 commits into
Conversation
sinkap
suggested changes
Jul 14, 2017
|
|
||
| return data.reindex(new_index) | ||
|
|
||
| def merge_dfs(pr_df, sec_df, pivot): |
Collaborator
There was a problem hiding this comment.
Please add a doctsring for this method and explain with an example in the documentation.
(A short excerpt like the one you have in the gist.)
| try: | ||
| if np.isnan(value): | ||
| data[key] = pivot_map[data[pivot]][key] | ||
| except: |
Collaborator
There was a problem hiding this comment.
A general except is not good. Can you specifically catch the excpetions that can possibly occur (and you expcect them to occur)
Author
There was a problem hiding this comment.
I got rid of this exception altogether to fix a perf issue and will post the fix soon, thanks
|
|
||
| return data.reindex(new_index) | ||
|
|
||
| def merge_dfs(pr_df, sec_df, pivot): |
Collaborator
There was a problem hiding this comment.
Also, since this is core functionality. We would need tests as well.
Author
There was a problem hiding this comment.
Yep this is a bit of a preview so I didn't add yet. Will do, thanks
added 3 commits
July 16, 2017 17:02
Forward propogate secondary DF into primary DF and return the merged DF. Implements: #250 Change-Id: I312d77302bbca8bb13bfa598785ebc0cc879fe34 Signed-off-by: Joel Fernandes <[email protected]>
Signed-off-by: Joel Fernandes <[email protected]>
This allows passing of arguments to callback, needed for the residency analysis state machine in LISA. Also update docstring. Signed-off-by: Joel Fernandes <[email protected]>
valschneider
pushed a commit
to valschneider/trappy
that referenced
this pull request
Sep 28, 2018
ipynb/examples: Update Executor example
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
I hacked something up that's working, just posting here. Basic idea is concatenate the DFS, mark them as primary/secondary, walk through them and remember the secondary information, propagate it to primary and rebuild the primary DF. I haven't written test cases yet. (CC @derkling @bjackman @sinkap)
Here's a gist showing it working in @derkling 's notebook:
https://gist.github.com/joelagnel/cc08ba964e40467e828741c691011ffc