Hi, Sid replace "7" with "5" or "6" in your screenshot in the line
csv_file_name = csv_file.split('\\')[7]
Now, why do we do this?
When I was running the code, my path was this mentioned below, when you use .split('\\') function on the below path, it splits everything that comes before and after\\ and converts it into a list.

So, try debugging on your side, print(csv_file) and see the actual path.
akash chhibber
Hi Yash,
thanks for this very useful tool and very informative article.
can you also help to understand how to store the data as we can get higher records than what excel can handle. like maybe from python itself make separate files for each symbol? secondly i get error when trying to download data from 2015 and earlier.. any specific reason for that?