Skip to main content

16.1 Python For PMs

It's time to learn how to code! This may be the module you've been eagerly waiting for since this program began—or the one you've been dreading most of all. If you are already familiar with Python, you may breeze through it, focusing only on submitting assignments. If you are an experienced coder in another language but new to Python, you will have an easier time than most and are sure to find that adding another language to your toolkit is a valuable asset.

If, however, this is your first exposure to coding languages, be prepared to spend more time than usual on these lessons. Learning this new skill will immediately make you more employable. Later on in your career, knowing even a bit of coding will also help increase your credibility with developers. But, it won't be easy. Many first-time coders get frustrated; it can be difficult to learn the syntax and logic that make programs work. Take your time, rely on your PMcademy team for support, and trust that things will get easier the more you practice. Remember, every Python expert was once where you are.

To be clear, you are not going to leave this module an engineer. Advanced coding skills are not necessary to become a product manager, but some familiarity with code languages is useful. It demonstrates to employers that you are tech savvy and that you'll be able to converse with engineers and understand the limitations and issues they deal with on a daily basis.

This familiarity is the goal here; in other words, this module is designed to help you build just enough skills in Python to reliably accomplish a limited number of tasks. Most of these tasks will be related to data analysis, giving you a two-for-one gain on skills employers look for familiarity with in new PMs.

If you get stuck solving a problem or decoding an error message, try searching for the problem on Google or Stack Overflow. You can also seek out help on PMcademy's Slack channels. In the local and #general-discussion channels of our community, you will find many students and graduates who share the experience of learning coding—or even specifically Python—for the first time. Don't be shy about asking for their guidance and encouragement. They did this, and so can you!

By the end of this module, you should be able to do the following:

  • Demonstrate basic knowledge of coding with Python
  • Work with Python in a cloud-based and Jupyter Notebook-based development environment
  • Use Google Colaboratory
  • Access and analyze data from common sources like CSV and web-based data APIs
  • Gain confidence in your ability to collaborate with engineers



Why Python?

Python is free and open source, meaning it has a low barrier to entry for programmers. Developed in the late 1980s, Python's popularity has exploded in recent years; according to GitHub, it is the second most popular coding language of 2019. It is considered a great first programming language because its syntax is clear and its popularity means there's no shortage of resources you can lean on as you're learning the basics.

We will be programming in Python 3, the latest version. However, a fair amount of Python 2 is still with us, and it is not always compatible with Python 3. We won't go into the details here other than to say that if you are executing code you found online and can't figure out why it's not working, check if it's written for Python 2—that might be why.

Python is used to program computers for nearly anything imaginable, from web development to artificial intelligence to data analytics. Python's huge and growing user base has also made available thousands of libraries to assist in programming tasks. Chances are, no matter what your program's objective is, "There's a package for that!"—and you won't have to write the code yourself.




Python for data analysis

Where does Python sit alongside other data analytics tools? When should a product manager look to Python as opposed to other tools?

The answer is—of course—it depends. One consideration relates to you doing data analyst work. If there's a task you can solve with either a spreadsheet or Python, you'll probably want to go with the option that will be quickest to execute on. Oftentimes, that answer will be something other than Python. For instance, if you're just trying to get a basic understanding of what's in a data source, you'll probably want to do that directly in SQL.

Here are examples of times when Python could be particularly useful in your work:

  • You need to retrieve and analyze data from web-based data APIs.
  • You need to consolidate data from several disparate sources and then analyze (say, from an API and a database).
  • You need to do extensive exploratory data analysis involving statistical analysis, and you need to run calculations in order to report on them in some other deliverable (say, a presentation).
  • You want to start to learn more advanced approaches to data analysis. (Note: You will not do this in this program, but these lessons will give you the core skills you would need to embark on learning advanced data analysis skills.)

It's worth noting that many product managers do not know how to program. The first responsibility of the product managers is to solve users' problems with creative, delightful solutions. That can be done without knowing how to program.

By learning the basics of programming and being self-sufficient at a limited number of data analysis skills in Python, you'll be giving yourself a competitive advantage over other job candidates who do not know how to program. Being able to program gives you access to more data sources and makes it easier to customize analysis.

Welcome to Jupyter

Jupyter Notebook is the main interface you'll use to work with Python in this module. Below and in the following checkpoints, you will find a Jupyter Notebook that was embedded in our curriculum app. Jupyter is a cloud-based environment, so you cannot save files directly to your computer. Instead, you will need to download them and then upload into another service. The next checkpoint will go over those details—for now, buckle up and enjoy your Jupyter journey.