Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. We all know Pythonβs basic container data types β lists, dictionaries, tuples, sets. "Container" is just a data type that holds multiple items instead of single values. However, many times basics are not enough. Like if you want count of different items in the list you will run a loop like below. In: fruits = ["apple", "banana", "apple", "cherry"] counts = {} for item in fruits: counts[item] =...
3 days agoΒ β’Β 1 min read
Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. Do you want to outsmart your friends (and interviewers) with Python? Couple of weeks back we played around with date and time using datetime module. Guess what - Python has another super handy module: calendar. Allows you to do all things related to calendars - like literally printing it in a readable form too. And its extremely simple to learn! Yet not many do it π Lets Go ππ β¨ Import calendar module...
4 days agoΒ β’Β 1 min read
Welcome back to Pandas Daily! Today, master Python in 7 snippets. Yesterday, we explored "f-strings", a MUST KNOW modern and clean way to insert text and format strings. However, you would also come across .format() , a previous version still used by many (for sure by my old boss :/ ). Note: Do go through the pervious post to better understand .format() π₯ Pass values using {} In: name = "Sam" # put the value into { } print("Hello, {}".format(name)) Out: Hello, Sam π Multiple curlies {} to add...
6 days agoΒ β’Β 1 min read
Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. Today: We learn "f-strings" - write variables and expressions directly inside a string f-strings are fast, neat way to put values into a string in Python. "Place an f" and use "curly braces {}". Example In: name = "Sam" marks = 88 result = f"{name} scored {marks} marks" print(result) Out: Sam scored 88 marks How it works: Everything inside {} is evaluated and inserted. Combine text and numbers with ease -...
7 days agoΒ β’Β 1 min read
Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. We all know how to access, create or delete files, folders on our computers. The UI is pretty simple right? However, at times you might need to do it through code. Lets say as an analyst you have to save daily sales report in a new folder every day. You would like to automate that? Here is when Python's os module comes in. What is this os module? The os module lets your code talk to the operating system β
...
10 days agoΒ β’Β 1 min read
Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. Python interviews rarely ask for theory. So today we go through most common, application based questions asked in interviews with simple snippets. Most concepts are covered in our past issues and you can do a quick refresher here. If you like this format time to time, do give your feedback in the poll at the end. βͺοΈ Reverse a string In: text = "samplestring" # [start : stop : step] # leaving start/stop...
11 days agoΒ β’Β 1 min read
Welcome back to Pandas Daily! Master Python in just 5 minutes a day. Yesterday, we learned the basics of "random" module β generating random numbers, setting seeds, and making simple picks. Today, we go beyond numbers - learn how to shuffle lists, pick items fairly or by weight, split datasets to train AI models. β οΈ "Shuffle" to change the order In: import random cards = [1, 2, 3, 4, 5] random.shuffle(cards) print(cards) Out: [3, 1, 5, 2, 4] πͺΉ Nested Lists can be shuffled too In: seats =...
12 days agoΒ β’Β 1 min read
Welcome back to Pandas Daily! Master Python in just 5 minutes a day. Today: Understand Python's "random" module to generate random numbers, create random samples for simulations, make random choices etc. Mini exercise at the end! Before we start, a quick question for you! What else can I add to the newsletter that would be useful for you. π Curated job links for Data Science/Data Analytics π» Curated external project links for practice π° Quick roundup of Python / AI / Data news βOther (reply...
13 days agoΒ β’Β 1 min read
Welcome back to Pandas Daily! Master Python in just 5 minutes a day. In case you missed Friday's issue on "datetime" you can take a quick peek here. Today we go one step ahead - understand how Python handles dates (π). Mini exercise at the end! π "timedelta" - to do any changes in date or time Here we add 7 days In: from datetime import date, timedelta d = date(2025, 8, 22) new_d = d + timedelta(days=7) print(d) print(new_d) Out: 2025-08-22 2025-08-29 π Going back in time? "timedelta" again...
13 days agoΒ β’Β 1 min read