-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: flesh out boxhead, body, and some more builders
- Loading branch information
Showing
7 changed files
with
103 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING | ||
from .utils_render_common import get_row_reorder_df | ||
|
||
class BodyAPI: | ||
pass | ||
|
||
if TYPE_CHECKING: | ||
from ._gt_data import Body, RowGroups, Stub, Boxhead | ||
|
||
|
||
def body_reassemble(body: Body, row_groups: RowGroups, stub_df: Stub, boxhead: Boxhead) -> Body: | ||
cols = [col_info.var for col_info in boxhead] | ||
start_final = get_row_reorder_df(row_groups, stub_df) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
from __future__ import annotations | ||
|
||
from ._gt_data import Stub, RowGroups | ||
from .utils_render_common import get_row_reorder_df | ||
|
||
class StubAPI(): | ||
pass | ||
|
||
def reorder_stub_df(stub_df: Stub, row_groups: RowGroups) -> Stub: | ||
start_final = get_row_reorder_df(row_groups, stub_df) | ||
|
||
stub_df = stub_df[[final for _, final in start_final]] | ||
|
||
return stub_df |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters