Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Working with Excel Files
Summary

Instruction

Amazing! Sometimes we would prefer to modify columns instead of rows. The authors of openpyxl have provided us with a very simple way to do so:

for cell in ws["E"]:
  cell.value = cell.value + 5

This way, we access every cell in the E column, from row 1 up to the last non-empty row.

Exercise

Add 3 to every price in the Other worksheet. The prices are stored in the B column.

Save the modified workbook in the file budget.xlsx.