Home > other >  Can't Index my Pandas Dataframe by Column
Can't Index my Pandas Dataframe by Column

Time:04-08

readHTML=pd.read_html(url)
#The pandas read turned back a list with some useless data
df=readHTML[11]
#Returned as data frame

enter image description here

CodePudding user response:

I ended up naming the columns by hand:

df.columns=['X', 'Filing_Date', 'Trade_Date', 'Ticker', 'Insider_Name', 'Title', 'Trade_Type', 'Price', 'Qty', 'Owned', 'ΔOwn', 'Value', '1d', '1w','1m', '6m']
  • Related