Announcing the winners & finalists of the Dataiku Frontrunner Awards 2021! Read their inspiring stories

How to concatenate dataframes

Solved!
LaurentS
Level 3
How to concatenate dataframes

Hello, say I have 2 separate dataframes (df) but with similar features (or columns if you prefer) as follow: col1 : name, col2: phone, col3 : price

df1 has 100 rows

df2 has 50 rows

I want to concatenate these 2 dataframes into 1 unique that would hence create a dataframe of 150 rows

In python, this is done through simple codes: for examples : 

dfAll = [df1, df2]
frame = pd.concat(dfAll)

How to do this in DSS.  I do not see any way to concatenate files, though there are different possibilities to join (which is a bit different)

 

Thanks

0 Kudos
1 Solution
AlexandreL
Dataiker
Dataiker

Hi, 

You can use a stack recipe to concatenate two or more datasets vertically. Please refer to this article for  more information on how to use it:

 https://knowledge.dataiku.com/latest/courses/visual-recipes/stack.html

Best regards,

Alexandre

View solution in original post

2 Replies
AlexandreL
Dataiker
Dataiker

Hi, 

You can use a stack recipe to concatenate two or more datasets vertically. Please refer to this article for  more information on how to use it:

 https://knowledge.dataiku.com/latest/courses/visual-recipes/stack.html

Best regards,

Alexandre

View solution in original post

LaurentS
Level 3
Author

HI and thanks.  I did not notice this recipe.  Kindest regards

0 Kudos
A banner prompting to get Dataiku DSS