0

I want to check when the values of a specific column (speed and mass) are included in the limits given by another dataset (speed from, speed to and mass from, mass to). If all the criteria are met, the value of the column power given in the dataset with the limits should be added on the dataset with the columns speed and mass.

An idea of how my code could look like is (:

if dfA['AirDensityFrom'] < dfB['AirDensity'] < = dfA['AirDensityTo]:
 if dfA['WindSpeedFrom'] < dfB['WindSpeed] <= dfA['WindSpeedTo']:
   dfB['power] =  dfA['power'] 

I want this to run for all the values in dfB['AirDensity'] and each time the criteria are met get the dfA['power'] for the specific row in a new column in dfB.

Alk12
  • 11
  • 2

0 Answers0