Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert series to dataframe pandas

In [119]:

common = df1.merge(df2,on=['col1','col2'])
print(common)
df1[(~df1.col1.isin(common.col1))&(~df1.col2.isin(common.col2))]
   col1  col2
0     1    10
1     2    11
2     3    12
Out[119]:
   col1  col2
3     4    13
4     5    14
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #series #dataframe #pandas
ADD COMMENT
Topic
Name
5+9 =