File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed
src/nested_pandas/nestedframe Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change 2
2
from __future__ import annotations
3
3
4
4
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"
13
5
14
6
15
7
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
48
40
# this node is homogeneous over all of its children, and can
49
41
# be evaluated in a single step.
50
42
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.
56
47
return result
57
48
58
49
You can’t perform that action at this time.
0 commit comments