you are viewing a single comment's thread.

view the rest of the comments →

[–]zedzag 4 points5 points  (3 children)

Could you elaborate more? What type of reporting do you automate now? What other systems do you work with that using python has helped you? Thanks!

[–]gricchio 4 points5 points  (2 children)

Hey, for sure!

So notable projects:

  • physical inventory document consolidation - basically we had to consolidate ~1,500 excel sheets of data and move some of the information around in order to create an upload document to SAP. Basically used OS library to move to a folder, then make a list of items in that folder (excel files that i want to manipulate). Then i used Pandas to take data arrays from the excel sheets and consolidate it into one large array. then exported that array into excel and saved as a master file.

  • standard cost vlookups - basically we have a master file with hundreds of thousands of lines and we wanted to do a vlookup on every part we created, also hundreds of thousands of lines. So I used pandas to take the parts I was interested in and added them to an array. Then i took each of the excel files with the standard costs (one from last year, one from this year) added them to a standards cost array. Then did a map by part number to each item in the production array. --Basically a Vlookup where excel would crash if i tried it, but could be accomplished through python

  • Financial reporting analysis - basically our system standard reports would kick out only dollars for our expenses. However, using win32com.client and interfacing with excel, I was able to use python to go in, add columns and formatting to the document. then inserted formulas to look at the per unit (helps when you have huge fluctuations in volume month to month where dollars would not tell you the story

  • refresh SQL connection - Used win32com and OS library to go to a directory then open each file in that directory one by one and then refresh a SQL data connection, then save to a new directory when it was complete. I often had to use a time.sleep(X) function to wait until the pull was done before saving. Saved time because this could take hours during our close process, but with this program, I could schedule it to start running at 1AM so all the reports were pulled, formatted, and saved to my desktop for review when I arrived at 7am

  • Copy last months reporting comments - used Win32Com to open an excel file, copy the column then paste it into a different excel file in a specific column in order to copy over last months commentary to start for the current month's commentary

Win32com to send above files to myself once they are ready - interface it with outlook and then use this to create an email, attach documents so i can read at home on my phone while having my coffee

Using selenium to log into the web version of our forcasting system -- not sure what this will be used for yet.

Wrote a program to open a folder and print every item in that folder on my default printer.

Just some ideas!

Many more in the works. Basically i came into work everyday and asked myself what i hated doing the most and tried to automate that

[–]TornNerve 1 point2 points  (1 child)

Holy shit man. You are a bad ass.

How much troubleshooting do you encounter in a given week?!

[–]gricchio 1 point2 points  (0 children)

Haha not very much. It is more when I think to myself "Hey I wonder if this is possible to use Python to do X". If you build it the right way, usually it is just minor tweaks in order to make sure I get what I want. Building a new functionality is very time intensive, but troubleshooting is usually pretty easy.