Skip to content
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

Concatenate two dataframes with same columns #83

Open
Nicinic opened this issue Mar 24, 2020 · 8 comments
Open

Concatenate two dataframes with same columns #83

Nicinic opened this issue Mar 24, 2020 · 8 comments
Assignees
Milestone

Comments

@Nicinic
Copy link

Nicinic commented Mar 24, 2020

Hi,
I'm using Joinery on a project to compute statistics inside a simulator. I'm looking for the best way to concatenate two dataframes that have the same columns (since they were extracted from the same main dataframe). However, I haven't found a way to do this with joinery, and I kindadoubt that adding each row of the second dataframe to the first is a good solution to this problem. Is there a method to concatenate two dataframes, similar to the method "concat" in pandas ?

If i use join with the Outer JoinType, each column gets dupliacted into right and left ones which isn't the result I want.

Thank you

@cardillo
Copy link
Owner

Does append give the desired result?

@Nicinic
Copy link
Author

Nicinic commented Mar 24, 2020

Yes it is possible to iterate over the second dataframe and append each row to the first dataframe to obtain the desired result
DataFrame<Object> df = ... ; DataFrame<Object> df2 = ...; for(List<Object> row : df2) { df.append(row); }

But is it really the optimal way to do it ?

@cardillo cardillo self-assigned this Mar 25, 2020
@cardillo
Copy link
Owner

Agree, not ideal, but should get you going today. I'll look at adding a more efficient concat implementation to next release.

@cardillo cardillo added this to the v1.10 milestone Mar 25, 2020
@Nicinic
Copy link
Author

Nicinic commented Mar 25, 2020

Thanks. I will use this solution until the new version comes out. And thanks a lot for this library

@jihoonkang0829
Copy link

Hi, I would like to contribute. Can you assign it to me? If not, I will start working on it!

@cardillo cardillo assigned jihoonkang0829 and unassigned cardillo Oct 17, 2021
@cardillo
Copy link
Owner

Thanks @jihoonkang0829, please submit a PR when you're ready.

@cardillo cardillo modified the milestones: v1.10, v1.11 Oct 18, 2021
@pkatre2
Copy link

pkatre2 commented Oct 23, 2021

can you assign it to me , would like to contribute

@donggua223344
Copy link

Can you assign it to me? I would like to contribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants