My three data frames (denoted df1, df2, df3) are 190 rows x 100,000 columns of time series data. I have different macroeconomic data in each data frame. The left most column are names of countries the time series will belong to. The first row is a title row of the time stamps of the data. I need to perform a time series calculation using the data across the three data frames so that the time stamps match, that the respective calculation using the value at 50 x 2500 is the same for all three data frames.
calculation = df1 value / ((df2 value - df1 value) * df3 value)
How can I go about this in a vectorized manner?
Small Minimum example of 3 dataframes and and a desired final results df
df1 = pd.DataFrame([['Bulgaria', 2, 3, 4, 5], ['Estonia', 2, 3, 4, 5], ['Sweden', 2, 3, 4, 5]], columns=['State', '1990', '1991', '1992', '1993'])
df2 = pd.DataFrame([['Bulgaria', 12, 13, 14, 15], ['Estonia', 12, 13, 14, 15], ['Sweden', 12, 13, 14, 15]], columns=['State', '1990', '1991', '1992', '1993'])
df3 = pd.DataFrame([['Bulgaria', .02, .03, .04, .05], ['Estonia', .02, .03, .04, .05], ['Sweden', .02, .03, .04, .05]], columns=['State', '1990', '1991', '1992', '1993'])
intended_final_df = pd.DataFrame([['Bulgaria', 10, 10, 10, 10], ['Estonia', 10, 10, 10, 10], ['Sweden', 10, 10, 10, 10]], columns=['State', '1990', '1991', '1992', '1993'])