(Aug-20-2020, 04:48 PM)Rejoice Wrote: am trying to pass two columns from two different dataframes, is there any way i can do it. I tried .apply however it will help me to pass two columns of same dataframe.
I presume you are working on some sort of stock market analysis, regarding if the market will be a good trading day or bad, (i.e. forecasting bears and bulls daily) through a bearish or bullish record. The only way I did it manually without a direct feed from the market was to put in a record of the Dow.
The "sum" was useful in the list.
while True: df1 = int(float(input("Enter the opening of DOW Jones markets: "))) df2 = int(float(input("Enter the closing of DOW Jones markets: "))) OPEN = [0,0,df1] CLOSE = [0,0,df2] if (sum(OPEN))>(sum(CLOSE)): print((sum(OPEN))-(sum(CLOSE)), 'OPENING') print(('BEARISH')) elif (sum(OPEN))<(sum(CLOSE)): print((sum(OPEN))+(sum(CLOSE)), 'CLOSING') print(('BULLISH')) else: print('Dow Jones Unchanged')