I have two dataframes, that i'll call A and B.
The DF A, has UsersId as index and 8000 rows and 9 columns like this:
index | col1 | col2 |
---|---|---|
aaa | 22 | 22 |
bbb | 33 | 33 |
DEF | 44 | 44 |
The DF B, also has UsersID as index and 500 rows and 4 columns, like this:
index | col1 | col2 |
---|---|---|
ccc | 22 | 22 |
ddd | 33 | 33 |
DEF | 44 | 44 |
My question is, how do i merge those both dataframes into a new one and than DELETE the row with the index def ?
To be more clearer, i need my newDF like this:
index | col1 | col2 |
---|---|---|
abc | 22 | 22 |
bcd | 33 | 33 |
ghi | 22 | 22 |
jkl | 33 | 33 |
This is how i want the new df, merged but with the index DEF and all row information deleted from it. Hope someone can help me :).The index on both tables is the UserID and it has different numbers of rows and columns, but same index.