+ 1

Replacing Certain Row Values in Python Pandas DataFrame

Hello Everybody, so what i want is as follows. I have two DataFrame from which one is a subset of the other: 1. DataFrame Index Value 0 5 1 3 2 5 3 3 4 6 2. DataFrame Index. Value 0. 4 3. 4 4. 4 Now i want to update the values of the 1. DataFrame with the values of the 2. DataFrame, but only if the value of 2. is higher than the one from first. So the result of the example above would look like this Index Value 0 5 1 3 2 5 3 4 4 6 Now i know, i can just run a for-loop, but since my DataFrames are really huge (around 10.000 rows), i would like to know, if there‘s an efficient was to do this. Thanks for your help.

17th Feb 2020, 5:57 PM
Long Kiet Nguyen
Long Kiet Nguyen - avatar
1 ответ
+ 1
I‘m sorry, the . (dots) happened, because i wrote this question ob my phone, where i write dots if i use double space. I‘ll try it out anyways, thanks 🙏🏻
18th Feb 2020, 8:58 AM
Long Kiet Nguyen
Long Kiet Nguyen - avatar