Skip to content
Snippets Groups Projects
Commit 8cd60a76 authored by Yassin's avatar Yassin
Browse files

Refactorings Code and Adding Node Filter

parent 65bdf3b1
No related branches found
No related tags found
1 merge request!1Adding new methods and the consensual backbone
...@@ -46,6 +46,10 @@ def fraction_filter(backbone, value, narrate=True, secondary_property='weight', ...@@ -46,6 +46,10 @@ def fraction_filter(backbone, value, narrate=True, secondary_property='weight',
value = math.ceil(value * len(data)) value = math.ceil(value * len(data))
if backbone.filter_on == 'Nodes':
secondary_property = None
secondary_property_ascending = None
if fraction_filter in backbone.compatible_filters(): if fraction_filter in backbone.compatible_filters():
data = data.sort_values(by=[column, secondary_property], ascending=[ascending, secondary_property_ascending]) data = data.sort_values(by=[column, secondary_property], ascending=[ascending, secondary_property_ascending])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment