I have a data frame as below:
I want to copy the selected values of easting and northing to the column longitude and latitude if northing is < 90 and then set the original values to None.
Here is my python code:
for i, j in waypoint_df.iterrows():
easting = j['easting']
northing = j['northing']
if northing and northing < 90:
waypoint_df.at[i,'latitude'] = northing
waypoint_df.at[i,'longitude'] = easting
waypoint_df.at[i,'northing'] = None
waypoint_df.at[i,'easting']= None
Is there a simpler way to run the operation above instead of iterating all rows?
