I have two pandas data frame, each of which have a date column. I need to find the rows that do not have a common date
Assuming that I created an index on the date column, there are solutions to finding the rows with common index like this But I cannot find any elegant solution to finding the rows that do not have a common date. e.g. df1
values 1
28/11/2000 -0.055276
29/11/2000 0.027427
30/11/2000 0.066009
01/12/2000 0.012749
04/12/2000 0.113892
df2
values 2
24/11/2000 -0.004808
27/11/2000 -0.001812
28/11/2000 -0.026316
29/11/2000 0.015222
30/11/2000 -0.024480
give two dataframes: one which contains the rows in df1 that are not having common dates
df11
value 1
01/12/2000 0.012749
04/12/2000 0.113892
And the other which contains the rows in df2 that are not having the common dates df22
value 2
24/11/2000 -0.004808
27/11/2000 -0.001812
I'm okay with any other format of output also e.g having both the data frame output in one single data frame, if we can reduce the number of steps.
There are solutions to finding the rows that are not equal to each other like this, but then each element of the row has to be the same.
Can anyone help figure out an elegant solution. Thank you for any input