Debugging applications can sometimes be an unwelcome activity. You’re busy working under a time crunch and you just want it to work. However, at other times, you might be learning a new language feature or experimenting with a new approach and want to understand more deeply how something is working. Regardless of the situation, debugging […]
Category: Data Analytics
Jupyter Notebook for Beginners: A Tutorial
The Jupyter Notebook is an incredibly powerful tool for interactively developing and presenting data science projects. A notebook integrates code and its output into a single document that combines visualisations, narrative text, mathematical equations, and other rich media. The intuitive workflow promotes iterative and rapid development, making notebooks an increasingly popular choice at the heart […]
11 Beginner Tips for Learning Python Programming
We are so excited that you have decided to embark on the journey of learning Python! One of the most common questions we receive from our readers is “What’s the best way to learn Python?” I believe that the first step in learning any programming language is making sure that you understand how to learn. […]
Python Regular Expressions Cheat Sheet
The tough thing about learning data is remembering all the syntax. While at Dataquest we advocate getting used to consulting the Python documentation, sometimes it’s nice to have a handy reference, so we’ve put together this cheat sheet to help you out! This cheat sheet is based on Python 3’s documentation on regular expressions. If […]
Thinking Recursively in Python
Of all ideas I have introduced to children, recursion stands out as the one idea that is particularly able to evoke an excited response.Seymour Papert, Mindstorms Problems (in life and also in computer science) can often seem big and scary. But if we keep chipping away at them, more often than not we can break […]
Pythonic Data Cleaning With NumPy and Pandas
Data scientists spend a large amount of their time cleaning datasets and getting them down to a form with which they can work. In fact, a lot of data scientists argue that the initial steps of obtaining and cleaning data constitute 80% of the job. Therefore, if you are just stepping into this field or […]
The Ultimate Guide To Speech Recognition With Python
Have you ever wondered how to add speech recognition to your Python project? If so, then keep reading! It’s easier than you might think. Far from a being a fad, the overwhelming success of speech-enabled products like Amazon Alexa has proven that some degree of speech support will be an essential aspect of household tech […]
4 Techniques for Testing Python Command-Line (CLI) Apps
You’ve just finished building your first Python command-line app. Or maybe your second or third. You’ve been learning Python for a while, and now you’re ready to build something bigger and more complex, but still runnable on a command-line. Or you are used to building and testing web applications or desktop apps with a GUI, […]
Exploring ROC Curves
I’ve always found ROC curves a little confusing. Particularly when it comes to ROC curves with imbalanced classes. This blog post is an exploration into receiver operating characteristic (i.e. ROC) curves and how they react to imbalanced classes. I start by loading the necessary libraries. 1 2 3 4 import numpy as np import matplotlib.pyplot […]
Using Headless Firefox with Selenium in Python
Headless Firefox and regular Firefox have the same capabilities, and running them with Selenium is a very similar process. The difference is that Headless Firefox does not generate any sort of user interface. In other words, no browser is visibly launched. If you happen to be web scraping with Selenium, it’s often helpful to see […]
Using Headless Chrome with Selenium in Python
Headless Chrome and regular Chrome have the same capabilities, and running them with Selenium is a very similar process. The difference is that Headless Chrome does not generate any sort of user interface. In other words, no browser is visibly launched. If you happen to be web scraping with Selenium, it’s often helpful to see […]
Python Project for Beginners: Bitcoin Price Notifications
Welcome to the first article in a series of articles on Python projects for beginners! In this tutorial we’re going to build a Bitcoin price notification service— During this project you’ll learn about HTTP requests and how to send them using the (appropriately named) requests package. You’re going to learn about webhooks and how you […]
Quick Guide to Installing Selenium (Firefox version)
To set up Selenium, you’ll first need to have Python installed. Check out my other posts if you need help with that. Next, you need to install Selenium. To do this, simply open up your Windows command prompt or Mac/Linux terminal and type: pip install selenium Now that Selenium is installed, you need to pick […]
What is the Python Global Interpreter Lock (GIL)?
The Python Global Interpreter Lock or GIL, in simple words, is a mutex (or a lock) that allows only one thread to hold the control of the Python interpreter. This means that only one thread can be in a state of execution at any point in time. The impact of the GIL isn’t visible to […]
Python Plotting With Matplotlib (Guide)
A picture says a thousand words, and with Python’s matplotlib library, it fortunately takes far less than a thousand words of code to create a production-quality graphic. However, matplotlib is also a massive library, and getting a plot to look “just right” is often practiced on a trial-and-error basis. Using one-liners to generate basic plots […]