Skip to content

REGR: preserve reindexed array object (instead of creating new array) for concat with all-NA array #47762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
jorisvandenbossche committed Aug 25, 2022
commit 12d848098f761efd49acedae6dd1317f8464fc4d
2 changes: 1 addition & 1 deletion pandas/tests/extension/array_with_attr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
FloatAttrDtype,
)

__all__ = ["FloatAttrArray", "FloatAttrDtype", "make_data"]
__all__ = ["FloatAttrArray", "FloatAttrDtype"]
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_concat_with_all_na():

result = pd.concat([df1.set_index("key"), df2.set_index("key")], axis=1)
expected = pd.DataFrame(
{"col": arr.take([0, 0, 1]), "col2": [1, np.nan, 2], "key": [0, 1, 2]}
{"col": arr.take([0, 1, -1]), "col2": [1, np.nan, 2], "key": [0, 1, 2]}
).set_index("key")
tm.assert_frame_equal(result, expected)
assert result["col"].array.attr == "test"