Skip to content

Commit

Permalink
actually fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
dougbrn committed Aug 13, 2024
1 parent 5eef6a5 commit 30e5859
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/nested_pandas/nestedframe/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def from_lists(cls, df, base_columns=None, list_columns=None, name="nested"):
return df[base_columns].join(packed_df)
# or just return the packed_df as a nestedframe if no base cols
else:
return packed_df.to_frame()
return NestedFrame(packed_df.to_frame())

def _split_query(self, expr) -> dict:
"""Splits a pandas query into multiple subqueries for nested and base layers"""
Expand Down
2 changes: 1 addition & 1 deletion tests/nested_pandas/nestedframe/test_nestedframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def test_from_lists():
assert list(res.columns) == ["nested"]
assert list(res.nested_columns) == ["nested"]

res = NestedFrame.from_lists(nf[["e"]], base_columns=None, list_columns=["e"])
res = NestedFrame.from_lists(nf[["e"]], base_columns=None, list_columns=None)
assert list(res.columns) == ["nested"]
assert list(res.nested_columns) == ["nested"]

Expand Down

0 comments on commit 30e5859

Please sign in to comment.