-
Notifications
You must be signed in to change notification settings - Fork 20
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
summarize_networks InvalidIndexError #191
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,7 @@ def summarize_networks(file_paths: Iterable[Union[str, PathLike]]) -> pd.DataFra | |
str(tup[0]): 1, | ||
}, index=tup[1] | ||
) | ||
dataframe = dataframe[~dataframe.index.duplicated(keep='first')] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a warning that edges are being dropped from a file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is hard to do here, we can think about whether it should be handled somewhere else. For instance, should the |
||
edge_dataframes.append(dataframe) | ||
|
||
# concatenating all the algorithm-specific dataframes together | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
,test-data-s1,test-data-s2,test-data-s3,test-data-longName,test-data-longName2,test-data-empty,test-data-spaces,test-data-mixed-direction | ||
A---B,1,1,0,0,0,0,0,0 | ||
C---D,1,1,0,0,0,0,0,1 | ||
E---F,1,1,0,0,0,0,0,1 | ||
L---M,0,1,1,0,0,0,1,0 | ||
M---N,0,0,1,0,0,0,0,0 | ||
O---P,0,0,1,0,0,0,1,0 | ||
P---Q,0,0,1,0,0,0,0,0 | ||
node1---node2,0,0,0,1,0,0,0,0 | ||
node1---node3,0,0,0,1,1,0,0,0 | ||
node4---node5,0,0,0,1,1,0,0,0 | ||
LONGERNAMES---TEST,0,0,0,1,1,0,0,0 | ||
node2---node3,0,0,0,0,1,0,0,0 | ||
nodes with---spaces in name,0,0,0,0,0,0,1,0 | ||
A-->B,0,0,0,0,0,0,0,1 | ||
B-->A,0,0,0,0,0,0,0,1 | ||
,test-data-s1,test-data-s2,test-data-s3,test-data-longName,test-data-longName2,test-data-empty,test-data-spaces,test-data-mixed-direction,test-repeat-edges | ||
A---B,1,1,0,0,0,0,0,0,1 | ||
C---D,1,1,0,0,0,0,0,1,1 | ||
E---F,1,1,0,0,0,0,0,1,1 | ||
L---M,0,1,1,0,0,0,1,0,0 | ||
M---N,0,0,1,0,0,0,0,0,0 | ||
O---P,0,0,1,0,0,0,1,0,0 | ||
P---Q,0,0,1,0,0,0,0,0,0 | ||
node1---node2,0,0,0,1,0,0,0,0,0 | ||
node1---node3,0,0,0,1,1,0,0,0,0 | ||
node4---node5,0,0,0,1,1,0,0,0,0 | ||
LONGERNAMES---TEST,0,0,0,1,1,0,0,0,0 | ||
node2---node3,0,0,0,0,1,0,0,0,0 | ||
nodes with---spaces in name,0,0,0,0,0,0,1,0,0 | ||
A-->B,0,0,0,0,0,0,0,1,0 | ||
B-->A,0,0,0,0,0,0,0,1,0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Node1 Node2 Rank Direction | ||
A B 1 U | ||
C D 1 U | ||
E F 1 U | ||
A B 1 U |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://pandas.pydata.org/docs/reference/api/pandas.Index.duplicated.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.