Skip to content

Commit

Permalink
Improves performance of QL by changing how the QL extracts node data …
Browse files Browse the repository at this point in the history
…when using MultiIndex (#143)
  • Loading branch information
ilumsden authored Aug 26, 2024
1 parent 30f0758 commit 4375612
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hatchet/query/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _cache_node(self, node, query, dframe):
_, filter_func = node_query
row = None
if isinstance(dframe.index, pd.MultiIndex):
row = pd.concat([dframe.loc[node]], keys=[node], names=["node"])
row = dframe.xs(node, level="node", drop_level=False)
else:
row = dframe.loc[node]
if filter_func(row):
Expand Down

0 comments on commit 4375612

Please sign in to comment.