Kursinnehåll
Excel Automation with Python (project)
Excel Automation with Python (project)
 Openpyxl and Pandas
Openpyxl and Pandas
Let's now import an excel file and transform it into a pandas DataFrame!
Using openpyxl and pandas together allowing for efficient data analysis and the creation of feature-rich Excel reports directly from Python.
Uppgift
Swipe to start coding
- Import pandasandopenpyxl;
- Extract the values of the workbook:- Use load_workbook()function that reads the file from the disk so that you can manipulate it;
- workbook.activehelp get access to the currently active worksheet in the workbook;
 
- Use 
- sheet.valuesproperty generates a generator of all the rows in the worksheet, where each row is represented as a tuple of cell values.
- Create a DataFrame (df) out of them:- Use pd.DataFrame()function.
 
- Use 
Lösning
Mark tasks as Completed
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 10
AVAILABLE TO ULTIMATE ONLY