Please check and see if you executed the complete code i.e make sure news_data is an empty list inside build_dataset(...) and you call this function as news_df = build_dataset(seed_urls). If you still get the same error it could be you are unable to retrieve the articles from inshorts (maybe due to network issues or you might be behind a proxy). In that case just download the news.csv file from my repository and use news_df = pd.read_csv('news.csv') and you can start working on the same dataset.

Data Science Lead @Applied4Tech, @Google Developer Expert — Machine Learning, Author, Consultant, AI Advisor @Springboard, Connect:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store