df1:
City, 2015-12-31, 2016-01-31, ...
YYZ 562.14, -701.18, ...
DFW 562.14, -701.18, ...
YYC 562.14, -701.18, ...
df2:
Does this work?
df2.drop(['City']).subtract(df1.drop(['City']))
Move the City column into the index. The DataFrames will align by both index and columns first and then do subtraction. Any combination not present will result in NaN
.
df2.set_index('City').subtract(df1.set_index('City'), fill_value=0)