Skip to content

Commit

Permalink
FIX-#6840: Call 'tolist' function in 'DtypesDescriptor._merge_dtypes' (
Browse files Browse the repository at this point in the history
…#6844)

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
  • Loading branch information
anmyachev committed Jan 19, 2024
1 parent cc4ca63 commit 177fc13
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modin/core/dataframe/pandas/metadata/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def _merge_dtypes(

if dtypes_are_unknown:
return DtypesDescriptor(
cols_with_unknown_dtypes=dtypes_matrix.index,
cols_with_unknown_dtypes=dtypes_matrix.index.tolist(),
know_all_names=know_all_names,
)

Expand Down
20 changes: 20 additions & 0 deletions modin/pandas/test/test_concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,26 @@ def test_concat_5776():
)


def test_concat_6840():
groupby_objs = []
for idx, lib in enumerate((pd, pandas)):
df1 = lib.DataFrame(
[["a", 1], ["b", 2], ["b", 4]], columns=["letter", "number"]
)
df1_g = df1.groupby("letter", as_index=False)["number"].agg("sum")

df2 = lib.DataFrame(
[["a", 3], ["a", 4], ["b", 1]], columns=["letter", "number"]
)
df2_g = df2.groupby("letter", as_index=False)["number"].agg("sum")
groupby_objs.append([df1_g, df2_g])

df_equals(
pd.concat(groupby_objs[0]),
pandas.concat(groupby_objs[1]),
)


def test_concat_with_empty_frame():
modin_empty_df = pd.DataFrame()
pandas_empty_df = pandas.DataFrame()
Expand Down

0 comments on commit 177fc13

Please sign in to comment.