Been stuck on this the past hour, and couldn't find a thread here that applies..
Assuming a dataframe:
sample_id | value
0 NAN
1 NAN
2 NAN
3 NAN
...
19990 NAN
I have many other dataframe which are very small subsets of the above. eg:
sample_id | value
0 2
1 4
and
sample_id | value
194 2
200 4
How would I update the values in the first dataframe with the second dataframe but leaving everything else untouched? Using map() overrides the values so that subsequent updates remove previously written values..
Intended outcome:
df = df.(df2) df = df.(df3)
final df:
sample_id | value
0 2
1 4
..
194 2
200 4
..
19990 NAN
I know I can use loops, but I'm sure theres a faster solution thats on the brink on the horizon that I havent figured out..
Thank you! :)