Subtracting values based on a relationship table
问题 I want to develop some code that will calculate the value of the target location (down gradient) by using a relationship table of targets and sources. The general formula is (value = down gradient - up gradient) or, given my relationship table, (value = target - all contributing source locations). Operationally, what I want to do is similar to one of my other posts, only this time I want to use subtraction. So, let's start with: import pandas as pd import networkx as nx import numpy as np df