How to Union Pandas DataFrames using Concat? Last Updated : 10 Jul, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report concat() function does all of the heavy liftings of performing concatenation operations along an axis while performing optional set logic (union or intersection) of the indexes (if any) on the other axes. The concat() function combines data frames in one of two ways: Stacked: Axis = 0 (This is the default option).Axis=0Side by Side: Axis = 1Axis=1 Steps to Union Pandas DataFrames using Concat: Create the first DataFrame Python3 import pandas as pd students1 = {'Class': ['10','10','10'], 'Name': ['Hari','Ravi','Aditi'], 'Marks': [80,85,93] } df1 = pd.DataFrame(students1, columns= ['Class','Name','Marks']) df1 Output: Create the second DataFrame Python3 import pandas as pd students2 = {'Class': ['10','10','10'], 'Name': ['Tanmay','Akshita','Rashi'], 'Marks': [89,91,87] } df2 = pd.DataFrame(students2, columns= ['Class','Name','Marks']) df2 Output: Union Pandas DataFrames using Concat Python3 pd.concat([df1,df2]) Output: Note: You’ll need to keep the same column names across all the DataFrames to avoid any ‘NaN’ values. Comment More infoAdvertise with us Next Article How to combine two DataFrames in Pandas? J joshiamit438 Follow Improve Article Tags : Data Science Python-pandas Python pandas-dataFrame python Practice Tags : python Similar Reads How to combine two DataFrames in Pandas? While working with data, there are multiple times when you would need to combine data from multiple sources. For example, you may have one DataFrame that contains information about a customer, while another DataFrame contains data about their transaction history. If you want to analyze this data tog 3 min read How To Concatenate Two or More Pandas DataFrames? In real-world data the information is often spread across multiple tables or files. To analyze it properly we need to bring all that data together. This is where the pd.concat() function in Pandas comes as it allows you to combine two or more DataFrames in: Vertically (stacking rows on top of each o 3 min read How to Join Pandas DataFrames using Merge? Joining and merging DataFrames is that the core process to start  out with data analysis and machine learning tasks. It's one of the toolkits which each Data Analyst or Data Scientist should master because in most cases data comes from multiple sources and files. In this tutorial, you'll how to join 3 min read How to Concatenate Column Values in Pandas DataFrame? Many times we need to combine values in different columns into a single column. There can be many use cases of this, like combining first and last names of people in a list, combining day, month, and year into a single column of Date, etc. Now we'll see how we can achieve this with the help of some 2 min read Convert JSON to Pandas DataFrame When working with data, it's common to encounter JSON (JavaScript Object Notation) files, which are widely used for storing and exchanging data. Pandas, a powerful data manipulation library in Python, provides a convenient way to convert JSON data into a Pandas data frame. In this article, we'll exp 4 min read Joining two Pandas DataFrames using merge() The merge() function is designed to merge two DataFrames based on one or more columns with matching values. The basic idea is to identify columns that contain common data between the DataFrames and use them to align rows. Let's understand the process of joining two pandas DataFrames using merge(), e 4 min read Like