Question about learning Python
I’ve been wanting to learn Python for some time now but I’m not sure of the best place to start. You can safely assume that I have no experience with widely-used programming languages, unless you count the Visual Basic course I took as an undergrad in in the mid-90s. 😊
To be clear, I’m not looking to become a computer programmer. I am primarily interested in using Python for data visualizations. I use Stata for statistical modeling and analysis (this is what I used in grad school and just haven’t bothered to take the leap to R), but I feel that it is a bit limited in terms of making appealing graphics, maps, etc. I would also like to learn web scraping to generate data from, say, 247, without having to collect it by hand.
So with these goals in mind, is there any particular place you would recommend I begin learning Python? I came across these tutorials on Kaggle but am not sure if they are very good. There’s always Coursera, but I would prefer to avoid paying if possible.
Serious and/or witty comments are always welcome.
March 10th, 2023 at 10:34 AM ^
During Covid, UofM was offering free Python courses through Coursera. I don't recall exactly how to get to it, but you could try that route with your umich.edu account if you have one.
Edit: Try this link - https://online.umich.edu/coursera-for-students/
March 10th, 2023 at 10:39 AM ^
All U-M created courses remain free to students, faculty, staff and alumni using UMich authentication through Michigan Online.
Python for Everybody is the second most popular course of all time on Coursera. Python 3 Programming is slightly more advanced, but may appeal to someone looking for more oomph.
March 10th, 2023 at 11:12 AM ^
noob question: for someone with no programming knowlege or experience, is python a good place to start? Is it better than other languages?
March 10th, 2023 at 11:16 AM ^
I'll let others give more details, but my understanding is that Python is a great place to start.
March 10th, 2023 at 12:45 PM ^
In CS curriculum Python is generally (or shouldn't be) not the first language those majors are exposed to.
Python's mass appeal is it's simplicity and ease. Hobbyists can pick it up with little effort.
But that comes at a price -- if one wants to be a developer, it's probably not best if Python is their first exposure. A lot of renown CS programs over the past few years have reverted to things like Pascal or even Smalltalk after learning their lessons from throwing students at high level languages to start with and to crank out developers (e.g., the "Java School" pejorative).
This will say a lot about me but when I read the OP title, I thought he was somehow referring to Monty Python, which made me click on the post.
Especially with a reboot of History of the World hitting streaming now.
The inventor of Python was actually watching Flying Circus when he named the language
March 10th, 2023 at 11:36 AM ^
If you plan on becoming a software engineer or something along those lines I would personally not begin with python. It is possible and viable but something like java would be a great place to start in my opinion due to how easy python syntax is. Once you learn java, all the other other languages should be easier to swap to.
March 10th, 2023 at 12:49 PM ^
If you want to be a software engineer, the language you want to start with depends on what you want to do.
If you want to do web stuff, then JavaScript (along with HTMl/CSS) is really the only answer. I personally hate JavaScript, but it rules the web. And there are a billion online resources for it.
If you want to do games, then your best choices are C# or C++. Most games now are developed in either Unity (C#) or Unreal (C++). C# is IMO significantly easier to digest than C++ because it reigns in some of the ridiculous flexibility of C++. That flexibility can be awesome if you are trying to squeeze performance out of your code, but when you are starting out it is just confusing as hell and usually results in you wanting to bash your head into the wall..
If you want to do mobile development, then you should choose Java (Android) or Swift (iOS). Or just make your mobile apps in Unity and use C#, which allows you one codebase for both Android & iOS.
March 10th, 2023 at 12:45 PM ^
For someone with zero background in programming or programming concepts whatsoever, Python might not be the best place to start. I would recommend an intro course in Java or C++ just to get the basics down.
From my vantage point as an amateur/hobbyist coder who is reasonably proficient in Python, Python is the ideal place to start unless your primary focus is on web development or developing for a specific platform. Python is not always easy (no full-fledged programming language is easy), but it is usually logical and sensible. Its syntax is relatively simple, and you can write a lot of useful programs in python without needing years of experience.
I would watch the Coursera course by UM Prof Chuck Severance referred to by other posters — that’s where I began, too. I’d also pick up “Automate the Boring Stuff with Python” by Al Sweigart. There are also countless useful instructional YouTube videos.
Start small and write programs that interest you. Master the fundamentals of how to do the core operations available for different data types. Off the top of my head, you’ll want to be fluent in the main operations available for strings, ints, floats, lists, dictionaries, and sets; how to write functions that return values; and how to write try/except loops and catch errors. Then, I’d learn how to open and close files, read text from files, and parse that text in various ways (such as by searching it with regular expressions). Delay studying classes until later, as they are conceptually challenging when you first get started.
Good luck!
March 10th, 2023 at 12:51 PM ^
Still free to everyone online.
cousera and edx (better site) both offer the Michigan course:
And you can audit it for free. You get the same content as the paid course but you just don't get a grade or a certificate.
One just has to pay attention when registering:
edX doesn't have the full series, just the intro and python data structures. Also, if you go through Michigan Online, you can access the full version on edX for free with umich login credentials.
I tried accessing Michigan Online as an alumnus and it said it was limited to current students, faculty and staff.
March 10th, 2023 at 10:40 AM ^
I took these courses and they were excellent. I'd recommend buying Professor Chuck's book on Amazon for $10 to accompany the courses, it makes it much easier.
March 10th, 2023 at 10:41 AM ^
Unfortunately I don't have one of those umich.edu accounts. But this is a great opportunity for those that do have one.
March 10th, 2023 at 11:48 AM ^
If you're alumni you can get one. I made one a few years back and took the Python courses as well. Didn't cost a thing except time and effort for the classes.
March 10th, 2023 at 12:52 PM ^
See my post above. The general public can take the MichiganX courses for free.
General public free course access is audit access, which because of how both platforms are set up does not allow access to any graded assignments. Just to clarify. Glad that you are making use of the Michigan MOOCs!
March 10th, 2023 at 10:35 AM ^
Hey OP, try out codecademy.com. They have a python course that you can earn a cert in along with other programming languages if you'd like. And it's free!
March 10th, 2023 at 10:42 AM ^
Thanks. I'll definitely check this out.
March 10th, 2023 at 10:44 AM ^
Python happens to be the specialty of U-M coding MOOCs offered on Coursera and edX. Dr Chuck Severance is a superstar in this field, and his Python for Everybody series is one of the most popular MOOC series of all time. Python 3 Programming is also an option that goes into slightly more depth (neither assumes background knowledge of python) and was created by, among many, Paul Resnick, who is now assistant Dean at the School of Information.
Best of all...the certificates are freely available to UM alumni, students, faculty and staff through online.umich.edu
March 10th, 2023 at 10:45 AM ^
Have you tried Google Data Studio aka Looker Studio? It does all of the back end work for you so you can focus on the visualization piece. Tableau is my favorite data visualization software, but Looker Studio is free.
March 10th, 2023 at 12:35 PM ^
Looker Studio is free
Not entirely.
The service is free to use but you pay for it when Google commoditizes and resells your data.
I'd only recommend this option if someone is a GSuite or Google One user. Otherwise, and especially in an office and/or client setting, they could be running afoul of data governance regulations and/or items in a contract.
March 10th, 2023 at 10:50 AM ^
Check this coding course database out:
https://reprorehabdb.usc.edu
It has courses for everything from basic to advanced Python.
Also, YouTube is a great resource for coding if you can find channels that fit what you want to learn.
March 10th, 2023 at 10:54 AM ^
Grab it by the head and not the tail.
March 10th, 2023 at 10:56 AM ^
I think it depends on how you best learn. I took a Python class at a local community college because I learn best in a small, in-person class vs. a massive class or just online resources. From there, it was easier to pick up the other things (like visualization) using web resources or books.
March 10th, 2023 at 10:56 AM ^
I feel like these 24" pythons are the only real contribution I can make to this thread.
You're welcome.
March 10th, 2023 at 11:40 AM ^
Also, upon additional introspection, I'm curious about the production shoot for this poster.
Photog: Ok Hulk, I'm gonna need you to hold these dumbbells for me please.
HH: Sure thing brother.
Photog: Now we're going to be shooting a poster for Toys R Us today. Little kids love you. And they love those giant "24 inch pythons" you've got.
HH: Take your vitamins. Eat your wheaties....
Photog: I'll stop you right there, but yes. Exactly. Now, if I can get you to maybe do that trademark 'Real American' Hulkster smile.
HH: You mean like this?
Photog: No, that looks like you want to murder someone. Remember this is a poster intended to go on a small child's bedroom wall or door.
HH: Ok brother. How about this?
Photog: Um. I'm not sure you're getting my point here. Do you have any faces that won't scare the living shit out of small children?
HH: Whatchagonnadooooooooooo
Photog: [SNAP] ok we got it!
March 10th, 2023 at 10:58 AM ^
I'm also an old programming/data visualization dog try new learn new tricks (Python) to keep up with the younger generation. I've tried starting Python on my own a few times, but my optimal learning style requires that someone holds my hand through the initial spin up phase. I also found it extremely frustrating when first dabbling with Python that setting up my environment to be successful was woefully difficult for this neophyte.
Thanks to everyone for suggesting the UM Coursera option. It looks like that's the perfect venue for me to dive into Python.
March 10th, 2023 at 11:08 AM ^
Software Carpentry is a good way to get started:
https://software-carpentry.org/
They have courses on general software practices, Python, and R
March 10th, 2023 at 11:27 AM ^
Python is a good tool for a lot of programmatic solutions so you're in the right place. If you're into web scraping I'd look into Scrapy and BeautifulSoup, and if you want to focus on data analysis and visualization check out Pandas.
In terms of learning python more generally I'd suggest any of the courses suggested here, RealPython, LearnPython.org, etc. For your use case you don't need to pay for a course IMO - yes you'll learn better programming approaches with a course but it sounds like you mostly want to write quick-and-dirty scripts to process data sets and scrape sites. You can pick up those skills mostly working off tutorials and reading the documentation for various libraries.
Good luck!
March 10th, 2023 at 11:28 AM ^
I’m my personal experience R is easier to learn than Python but YMMV. I also generally prefer Tableau to both for data visualization since I’m not artistically minded enough to customize my own visualizations and the tableau templates are easy to work with.
March 10th, 2023 at 11:29 AM ^
I'm a Quality Engineer for a large software company and just recently started using Python to code our Selenium test scripts. Unfortunately all of the training materials that we use are internal to the company so I can't share.
I will say, however, that if you have a basic knowledge of programming logic it is really simple to learn. When I was introduced to programming in 2011 at University of Cincinnati we used Java and C#. In my opinion, Python is simpler to follow, but keep in mind everyone has a preference. At my company we can use either Eclipse or Pycharm to write our code.
March 10th, 2023 at 11:43 AM ^
I'd download Anaconda because it includes and sets up the basic packages you'll need for what you want to do. Within Anaconda, you'll open Spyder, which will be your console, to edit your .py files and also view variables in a spreadsheet like format, or display the graphics.
You say you don't have programming experience, but you also seem to know what you want to do. So I'd say a lot of the "learn python" things will start with extremely simple things like writing "hello world", what you might want to do is look for youtube tutorials for Matplotlib and Pandas, which will be visualization and data libraries, and also Numpy and Scipy, which are like the fundamental operations you'll do on the data.
If you get stuck on something, trying looking for an answer on StackExchange.
March 10th, 2023 at 11:54 AM ^
just a note from me, my son who is a grad student that just finished a BioStats graduate course centered on R, and almost every professional biostatistician I know.
don’t use R. do yourself a favor and delete the program.
once that is done, purchase GraphPad Prism, and charge the cost to your company. $260 per year or thereabouts. easy to use, same if not more options, produces publication quality figures that are highly editable as far as looks, and don’t need to know codes/syntax etc. GraphPad also has a free trial subscription so you can play with it and learn it before deciding to purchase.
March 10th, 2023 at 12:45 PM ^
When I was in grad school I had to learn Stata, LimDep, and RATS all to estimate different types of models. Stata now does everything I need, but all the cool kids have long ago moved on to R.
I still need a statistical program that I’m familiar with, so I’ll stick with Stata. But I always like learning new things and having the flexibility to visualize data in ways it doesn’t allow. I’ll have to look into GraphPad.
March 10th, 2023 at 12:19 PM ^
I learned python back in 2005 using the free e-book "Dive Into Python" (available online). I found it easy, but I was an experienced programmer. I'm not sure if a newbie would find it too difficult, but you can check it out for free.
March 10th, 2023 at 12:30 PM ^
There’s always Coursera, but I would prefer to avoid paying if possible.
You don't have to pay. You can audit the course for free. Paying just gives you a certificate.
March 10th, 2023 at 12:46 PM ^
That’s good to know. Thanks.
March 10th, 2023 at 12:34 PM ^
Thanks everyone for all of the great suggestions! One of the reasons I love this board. It looks like there are plenty of free tutorials to look at to get started. Definitely keep them coming if you have more ideas.
March 10th, 2023 at 12:42 PM ^
You mean programming in FORTRAN using punch cards at NUBS is no longer a good entry point?
Bummer...
March 10th, 2023 at 12:58 PM ^
LOL, spent way more time there than I would have liked. Thanks for the flashback!
March 10th, 2023 at 12:59 PM ^
Still valid.
Fortran's spec was updated in 2018 and there is a 2023 release planned.
At the Computer History Museum in Silicon Valley... must see for any nerd, they have an exhibit where one can punch their own cards.
Additionally, University of Michigan has a display at the CHM for creating the world's smallest computer. Three of them are balanced on golf tees in the exhibit.
Too many hours there. Though I loved those giant punchcard creating machines. I remember they called it ALGOL-W at that point just because they wanted to be different.
There was nothing like having an assignment due and your account was down under $10 so you had to double- and triple-check your stack of punchcards because you couldn't afford any errors.
It's hard to say where to start these days. It depends on how you approach programming, what types of projects you think you'll work on. I've learned so many different things, but keep going back to C++ because of speed and control. Even the std: libraries, which offer more function and safer code, seem slow to me sometimes.
Speaking of IBM punch cards, who can ever forget registering for classes with CRISP?
/https://alumni.umich.edu/michigan-alum/history-lessons-crisp/
Computer Registration In Spite of Problems
Ha! I only knew it as "Involving Student Participation." And no punch cards a decade later, IIRC.
March 10th, 2023 at 12:54 PM ^
Another site I haven't seen referenced yet here is freeCodeCamp. Good luck all.