r/learnpython • u/Sonoshitthereiwas • Sep 18 '23
Why does Python seem so complicated?
First, a little background. I've been using Excel for ages now, about 15 years now with a large increase in the last 5 years. Mainly functions and visuals, a small bit of optimization and a tiny bit of VBA. I'm more than comfortable with vlookup, and our work computers aren't updated so I haven't had much opportunity to use xlookup. I've made things with the sort, filter, and offset function to include conditional formatting as study aides for GRE study resource. Within my current field, I'm considered a wizard, however, against true wizards I'd be a novice. But I can use it very efficiently and relatively easily.
I'm in the process of switching careers, and as part of that I'm learning Python. I'm in a course that had us do some courses in DataCamp to help learn Python. I completed the courses, but it was mainly brute forcing my way through. I'm going back through and trying to recreate much of the items we went over to make sure I 'get it'.
I've been using ChatGPT to help me along the way, and I can generally get what I need, but I have no understanding of what I'm actually doing. And that's my problem. In Excel, I understood exactly what I was doing and could effectively trouble shoot any issue I ran into.
With Python, I'm stuck using ChatGPT, and if ChatGPT can't solve it then I can't seem to do anything. It just doesn't make sense to me. I have numpy, pandas, openpxl installed. I even tried doing some web scraping with selenium, which I was able to get it to open a web page, but nothing beyond that. That one I was definitely reaching too far on, and I get that, but I use it to show I feel like I'm a decent trouble shooter.
Maybe I'm overestimating my abilities, but I just cant get an understanding of how to effectively use Python. I feel like I have to envision every single aspect of what I'm doing, and as someone who isn't a very visual thinker, that basically means I need a separate log of anything I'm doing before I do anything. And the feels anti-productive.
I loaded a file into Python and there are two columns of data I was trying to turn into arrays. That took me like an hour to get done and I ended up turning them into values rather than arrays. Actually, I suppose it was a bit of both, but it just seems needlessly complicated to try and understand what I'm doing.
How do you keep track of what you're doing? Using things like .head I thought might be helpful, but there are mixes of blank and empty data. It has over 2000 rows and a quick visual of it makes it even more complicated to look at it. Is it best just to accept I'll use ChatGPT without understanding?
3
u/czar_el Sep 19 '23
Excel is a spreadsheet program with a GUI interface that allows you to do a single function at a time, or multiple functions if you nest them. It also allows you to specify the cells you're applying the function(s) to.
Those activities are a very small subset of what a coding language like Python does. To answer your post title question: Python isn't complicated, coding is complicated compared to Excel. Coding languages don't hold your hand like a GUI spreadsheet program does (e.g. for selecting data files, launching commands, handling filepaths, saving results, selecting sheets and cells, etc), coding languages are the underlying commands that a GUI handles for you without you knowing
An analogy is that you've been a train conductor for years and have been good at it. You think to yourself "trains have wheels, and cars do too, I'd be a great car driver!" But if you've never driven a car before, you quickly find out your train experience doesn't exactly prepare you as well as you thought, since you've never had to steer before, or consider road types, or deal with pedals and shifters. Excel is on rails, because the GUI does so much of the steering and other work for you. Python has no rails, you can go wherever you want, but it's significantly more comex to know how to get there.
Bottom line, yes, you overstated your abilities. Excel wizard does not equal coding wizard. They're different skillsets. I was in the same boat as you years ago. I was the Excel and VBA guy in an org full of non-tech people, and wowed the pants off them. I made the pivot to coding languages, but it took years of actual study (e.g. books, courses, and even grad school), not asking ChatGPT, which others have already warned you is unreliable and will not teach you fundamentals even when it does not return errors. Humble yourself a bit and start at the basics from an actual curriculum. Don't rely on ChatGPT while you learn. Use it as an idea generator when you have the skill to evaluate whether its results are accurate or not. But to use it when you can't evaluate it is a way to cause problems for yourself down the line.