Skip to content

Commit ce37a14

Browse files
committed
Remove vestigial NestedType enum; clarify recursive logic.
1 parent f617344 commit ce37a14

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/nested_pandas/nestedframe/utils.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22
from __future__ import annotations
33

44
import ast
5-
from enum import Enum
6-
7-
8-
class NestingType(Enum):
9-
"""Types of sub-expressions possible in a NestedFrame string expression."""
10-
11-
BASE = "base"
12-
NESTED = "nested"
135

146

157
def _actionable_splits(parents: list[ast.expr], node: ast.expr | None) -> dict[str, list]:
@@ -48,11 +40,10 @@ def _actionable_splits(parents: list[ast.expr], node: ast.expr | None) -> dict[s
4840
# this node is homogeneous over all of its children, and can
4941
# be evaluated in a single step.
5042
result = {k: [node] for k in result}
51-
else:
52-
# At this point, we need to split the expression. The idea here is that
53-
# we want a succession of efficient queries, each of which will produce
54-
# a subset of either the base or the nested columns.
55-
pass
43+
# If the result is either empty or has more than one key, leave the result
44+
# alone. Each key represents a different nest (with a blank string for the base),
45+
# and the value is the highest point in the expression tree where the expression
46+
# was still within a single nest.
5647
return result
5748

5849

0 commit comments

Comments
 (0)