Is there a way to get the element that belong only to a dataset d1 and not to another one d2, with pandas?
In this case first add both the dataframes and then subtract the other.
Eg : A = ( a,b,c,d )  , B = ( a,b,e,g ).   Here I mean to say that a,b,c,d,e,f are the column names.
So , if you want column ( c,d ) only , then do

C = A + B , then ,
C = C - B and hence you will be left with columns ( c,d ) only.

Likewise you can do for ( e,g ) columns.
If I have two datasets d1 and d2, where the d1 columns are:
d1_columns {X,Y,Z,T}
and for d2 :
d2_columns{X,Y,L,P}
Is there a function f such that:
f(d1,d2) = {Z,T} or equivalently: f(d1,d2) = {L,P} ?