Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

concatenate dataframes pandas without duplicates

>>> df1
   A  B
0  1  2
1  3  1
>>> df2
   A  B
0  5  6
1  3  1
>>> pandas.concat([df1,df2]).drop_duplicates().reset_index(drop=True)
   A  B
0  1  2
1  3  1
2  5  6
Comment

PREVIOUS NEXT
Code Example
Python :: accept user input in python 
Python :: remove character from string by index in python 
Python :: how to fetch all chars of a string before a space in python 
Python :: The Python path in your debug configuration is invalid. 
Python :: python returen Thread 
Python :: python get file path from in os.walk 
Python :: keras linear regression 
Python :: python tkinter change color of main window 
Python :: qlistwidget item clicked event pyqt 
Python :: python os abspath 
Python :: python3 strip punctuation from string 
Python :: python mahalanobis distance 
Python :: python assert 
Python :: pandas count the number of unique values in a column 
Python :: import gensim 
Python :: python console width 
Python :: python display name plot 
Python :: duplicate data in python 
Python :: how to save a python object in a file 
Python :: list python virtual environments 
Python :: python subprocess stdout to dev null 
Python :: pandas select 2nd row 
Python :: strip array of strings python 
Python :: how to remove numbers from a dataframe in python 
Python :: Iterating With for Loops in Python Using range() and len() 
Python :: np array to tuple 
Python :: pip install qrcode python 
Python :: convert string of list to list python 
Python :: compress image pillow 
Python :: remove extra spaces and empty lines from string python 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =