Python Forum

Full Version: Manipulating an Excel Workbook
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello! I currently have an excel spreadsheet that is showing me data but I need to be able to manipulate that data, find exceptions, and suggest corrections. From what I can tell, I am not sure I can do it in excel itself. My question is, can I write a code in python that will interact with that spreadsheet in the way I need it to? I used to have a basic understanding of python but have since gotten rusty. Is it worth re-learning python to be able to manipulate my spreadsheet? Any suggestions or help is appreciated! Thank you!
Certainly you can do this with python with an excel package, probably pandas
but I expect it might be easier to figure out how to do what you want with excel formulas.
a real example would be helpful.
Here is what I need to do...
I have 3 columns representing recitals. Each student has a row that populates those three columns. If they have one class in recital 1, there is a 1 in the column. If they have 2, its a 2. It populates for each recital. So if they have one class in each recital, there will be a 1 in every recital column. What I need is for a program to find and show all students who have classes in more that one recital. Once that is found, if there is a way for it to suggest potential fixes so that all there classes are in one recital that would be amazing. The difficult thing is that there are close to 300 students. Is it possible that a python code could do this. Or does it make more sense to go about it a different way? Thank you!
Quote:Stanimal:
Is it possible that a python code could do this.

from my previous post:
Quote:Larz60:
Certainly you can do this with python with an excel package, probably pandas
It should be quite easy, do you know any python?

see: https://python-forum.io/Thread-A-List-of...n+tutorial

recommended:
python tutorial either of:
http://openbookproject.net/thinkcs/python/english3e/
https://www.python-course.eu/python3_course.php

pandas tutorial: https://www.learnpython.org/en/Pandas_Basics

Python tutorials:
I can't really say that I know any python any more. Thank you very much for the link to the tutorials!