What I am trying to do.
I am scraping a website and generating a table and exporting it to data frame below. The code generates a table below with row indices, not shown.
I am trying to find a correlation between "Open" and "Volumes" column row by row using the code df[['Open','Volumes']].corr()
but this is not yielding any output but just an underscore.
Can someone tell me where is the issue in my code?
Excerpt from code
df = pd.DataFrame({'Contracts' :Contracts,'Open':Opens, 'High':Highs, 'Low':Lows,'Last':Lasts,'Pct':Pcts,'Time':Times, 'Volumes' : Volumes, 'Previous Settled' : ps})
Output
Contracts Open High Low Last Pct Time Volumes
Oct 2018 (E) 2.810 2.814 2.762 2.767 -1.77% 09/14/18 0
Nov 2018 (E) 2.797 2.802 2.748 2.751 -1.78% 09/14/18 132969
Dec 2018 (E) 2.886 2.890 2.840 2.843 -1.65% 09/14/18 91025
Jan 2019 (E) 2.974 2.981 2.930 2.934 -1.64% 09/14/18 39348
Feb 2019 (E) 2.948 2.952 2.904 2.908 -1.62% 09/14/18 39377