简体   繁体   中英

How can I extract data from an excel file like this using python and pandas?

How can I extract data from an excel file like this using python and pandas? It has got multiple tables at different positions. Here is the structure of the table

Convert it into a csv file

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/6409-saving-an-excel-file-as-a-csv-file?lang=en_US

Then you use an IDE like VSCode, interpreter like python and packages like pandas to convert the csv file back into a table. Below is a simple python code to convert the csv into table

import pandas as pd

df=pd.DataFrame("/path/to/csv/file")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM