Skip to content
Advertisement

Appending Dataframe to another dataframe with first row removed

JavaScript

Right now this query creates 14 csv files. What I wanted is, the for loop to remove the first row of column headers and append the data to a dataframe I created outside the for loop. so that I can get it as single csv file.

I am using BS and Pandas.

Advertisement

Answer

This is one way of achieving your goal:

JavaScript

Data will be saved to a csv file, and also printed in terminal:

JavaScript

Requests can return responses in JSON format, so you don;t need to import bs4 & json.

For TQDM, please see https://pypi.org/project/tqdm/

For pandas documentation, visit https://pandas.pydata.org/docs/

Also for Requests: https://requests.readthedocs.io/en/latest/

Advertisement