We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
modin.__version__
if __name__ == "__main__": import modin.pandas as pd import pandas kwargs1 = { "data": [[1, 2, 3], [4, 5, 6], [7, 8, 9]], "columns": pandas.Index(["a", "b", "c"], name="col1") } kwargs2 = { "data": [[1, 2, 3], [4, 5, 6], [7, 8, 9]], "columns": pandas.Index(["e", "f", "g"], name="col1") } md_df1, md_df2 = pd.DataFrame(**kwargs1), pd.DataFrame(**kwargs2) pd_df1, pd_df2 = pandas.DataFrame(**kwargs1), pandas.DataFrame(**kwargs2) keys = ["first", "second"] print("Pandas result:\n", pandas.concat([pd_df1, pd_df2], keys=keys, axis=1).columns) print("Modin result:\n", pd.concat([md_df1, md_df2], keys=keys, axis=1).columns)
Output:
Pandas result: MultiIndex([( 'first', 'a'), ( 'first', 'b'), ( 'first', 'c'), ('second', 'e'), ('second', 'f'), ('second', 'g')], names=[None, 'col1']) Modin result: MultiIndex([( 'first', 'a'), ( 'first', 'b'), ( 'first', 'c'), ('second', 'e'), ('second', 'f'), ('second', 'g')], )
Modin version of concat loses index names. That bug seems to appear only when keys parameter specified.
keys
The text was updated successfully, but these errors were encountered:
[FIX] Fix #1683 - losing index names in pd.concat (#1684)
51c3803
Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
[FIX] Fix modin-project#1683 - losing index names in pd.concat (modin…
55d05c8
…-project#1684) Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
dchigarev
Successfully merging a pull request may close this issue.
System information
modin.__version__
): 0.7.3+170.g7a4b735Output:
Describe the problem
Modin version of concat loses index names. That bug seems to appear only when
keys
parameter specified.The text was updated successfully, but these errors were encountered: