Category: Python

underscore in python 0

Various uses of underscore “_” in Python

The underscore has different use cases in different programming languages. In this post, I will show you various uses of “_” in Python. Uses of “_” in Python Number formatting If we use large numbers in Python, it is easier to read if we separate thousands, millions, and billions. The underscore does precisely that in Python. The underscore can be used to make the...

wsl2 for data science 0

How to install Jupyter Lab on Ubuntu in 2024

Jupyter offers Jupyter Lab and Jupyter Notebook, both of which are web applications that offer interactive development environments for Python code and data science. This article will show you how to install Jupyter Lab on Ubuntu using either pip or conda. Jupyter Lab vs Jupyter Notebook We have two options to install Jupyter: Jupyter Lab and Jupyter Notebook. Jupyter Notebook is a classic Jupyter...

generic graph 0

Setting up WSL2 for data science projects in Windows

Ubuntu is one of the most popular operating systems among programmers, data engineers, and data scientists. For Windows users, Ubuntu and other Linux distributions are available through WSL2, which stands for Windows Subsystem for Linux. We can easily install Ubuntu in WSL2 and set it up quickly to start working on data science projects. This post shows the steps required to set up the...

python-one-liners 204

Most important Python one-liners for faster coding

Python is an easy-to-learn, multi-purpose programming language, which also has a shorter syntax than most programming languages. We can shorten the code further by using one-liner tricks that reduce the multi-line code into a single line. In this article, we will explore some Python one-liners for faster coding and day-to-day use. Contents Ternary Operator (if…else one-liner) The ternary operator in Python is a bit...

python import example 381

A misconception about package import in Python

Python is a powerful language that allows developers to quickly and easily add standard functionality to their programs by using built-in and external packages. These packages can be installed into the Python environment and imported into our code using simple import statements. However, there is a common misconception among developers, both new and experienced, about memory usage during package import in Python. In this...