NumPy Tutorial – Everything You Need to Know to Get Started

This tutorial gives you a simple introduction to Python’s NumPy library. You don’t need any prerequisites to follow the tutorial. My goal was to give a practical and fun NumPy introduction for absolute beginners with many examples. πŸ’‘ By reading through this tutorial, you will gain a basic understanding of the most important NumPy functionality. … Read more

Top 8 Profitable Python Packages to Learn in 2023

Are you interested in Python but you don’t know which Python library is most attractive from a career point of view? Well, you should focus on the library you’re most excited about. But if you’re generally open because you have multiple passions, it would be reasonable to also consider annual and hourly income. These are … Read more

How to Convert a List of Booleans to Integers

Problem Formulation and Solution Overview In this article, you’ll learn how to convert a List of Booleans to Integers. In Python, the Boolean is a built-in data type. These values represent True (1) or False (0). Also referred to as Truthy or Falsy values. In this article, we will articulate how these values behave. To … Read more

Python Convert String to CSV File

Problem Formulation Given a Python string: πŸ’¬ Question: How to convert the string to a CSV file in Python? The desired output is the CSV file: ‘my_file.csv’: a,b,c 1,2,3 9,8,7 Simple Vanilla Python Solution To convert a multi-line string with comma-separated values to a CSV file in Python, simply write the string in a file … Read more

How to Find All Matches using Regex

Problem Formulation and Solution Overview In this article, you’ll learn how to find all matches in a string using regex. The Regular Expression, also referred to as regex, is a complex pattern to search for and locate matching character(s) within a string. At first, this concept may seem daunting, but with practice, regex will improve … Read more

How to Replace Whitespaces with Underscores

Problem Formulation and Solution Overview In this article, you’ll learn how to replace whitespaces with underscores in Python. To make it more fun, we have the following running scenario: Bryan, an IT Instructor, has given his students a Python coding challenge: Take a famous quote and replace all whitespaces with underscores in four (4) ways: … Read more

[List] How to Check Package Version in Python

If you’re short on time, the simple solution is to run the following command in your shell/terminal/CMD/PowerShell to check the version of library xxx: But many more interesting ways to check package versions may be useful for you! The following table refers to a list of articles to help you check the package/library/module version installed … Read more

Before After Image in Plotly Dash

πŸ’‘ This article will show you how to use the BeforeAfter image component in your Plotly Dash project. Dash book author Ann just created the following stunning web project visualizing before/after galaxy images from the James Webb Space Telescope in a simple and straightforward Dash app using the BeforeAfter component of the dash-extensions library. Before … Read more