I feel like I'm missing something obvious here.
I have two vectors of integers of different lengths (x and y). I'd like to create a pandas dataframe with x rows and y columns where each cell contains the difference between corresponding elements of the two vectors.
For example, given
v1 = np.array([2,4,8])
v2 = np.array([1,3])
v1 - v2
I'd like to get something back like
np.array([[ 1, -1],
[ 3, 1],
[ 7, 5]])
The code above is using numpy, but ultimately, I'd like to do this with Pandas.
Apologies in advance if this is a duplicate or unclear. I'm honestly not sure what terms to be searching for here.