I am not too sure how to ask, I am new to Python and programming as whole but here is my question. I hope it makes sense..
I am currently working on a populating a postgres database where I have this loop which iterates along with reading a csv file to get a certain output and then Insert/query that into a table. "Basically creating a handle"
But I get an error which I am assuming its due to empty values in the csv files. I have learned Pandas in the past to clean up data but the Github's code where I extracted this code does not seem to include Pandas to do so.
In the video which is from Youtuber/Engineer "Part Time Larry - Tracking ARK Invest ETFs with Python and PostgreSQL" he obviously uses the exact same code but he does not get the same Index Error. Not sure how to by pass this error, I have read and watched videos but it doesn't explain this specific scenario
Here is the index list:
['date', 'fund', 'company', 'ticker', 'cusip', 'shares', 'market value ($)', 'weight (%)']
PS. I do understand Generally, the index range of a list is 0 to n-1, with n being the total number of values in the list.
the range is from 0 to 7 making it 8 values in the index list
Here is the Github's link in case you want to check it out and the YT link https://github.com/hackingthemarkets/ark-funds-tracker
YT Link: https://www.youtube.com/watch?v=5uW0TLHQg9w&t=1093s Time stamp: Minute 11:56
Below are 3 images: the code, the error, and the CSV file at the end



