profile

Pandas Daily

Beginner to Expert in Python in just 5 minutes

Featured Post

📊 Still guessing averages? Learn executing basic stats in Python

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. You have a spreadsheet with 500 numbers. Your boss asks: "What do you see?" Most will freeze, scroll, guess. Not you! 3 Python functions to turn raw numbers into answers. No calculator, excel sheets. Just code. Statistics isn't boring math. It's how you make decisions with data. Using just the statistics module we find "center" of any dataset. Any data analyst must know the basics‼️ 🎯 Compute simple...

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. Last week we introduced numpy. Created bunch of arrays, sliced them and did some math with them. To prepare data for machine learning or any analysis, we need to learn to control their shape. Today - Reshape flat lists into grids. Flatten 2D tables back to 1D arrays. Create arrays filled with zeros, ones, or random numbers. ⏪ Recap: See dimensions first In: import numpy as np sales = np.array([120, 340,...

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. TGIF! Everyone is talking about AI. Most people take courses. You're going to build it instead. Let's create a simple sentiment analyzer that reads customer reviews and classifies them as positive or negative. No machine learning libraries—just Python. 🎯 Define list of positive and negative words In: positive_words = ["good", "great", "excellent", "amazing", "love", "best"] negative_words = ["bad",...

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. We created arrays on Day 1. Sliced them on Day 2. Now comes the real computational power of NumPy. Doing math on entire datasets. No loops. No iteration. Just one line. Add monthly revenues across regions. Calculate profit margins. Find averages. All in seconds!! Let's dive in.. 🍃 Add/Subtract like a breeze In: import numpy as np jan_sales = np.array([120, 340, 210]) feb_sales = np.array([150, 290, 180])...

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. Yesterday we introduced NumPy and created few arrays. Today we learn how to access them. Think about it - You have a dataset with 10,000 prices. You need the first 100. Or the last one. Or every other value. That's indexing and slicing. Without it, arrays are useless. With it, you control your data. Let's get to the snippets. 🚩 Get value by position (index) [0] means 1st position and so on. This array can...

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. Python lists are flexible but slow at scale. Enter NumPy - a Python library for fast numerical computing. It has arrays—a special data structure to store numbers efficiently. Arrays outperform regular Python lists in speed and memory. NumPy also has powerful math functions: statistics, linear algebra, random numbers, and more. Every major data science library - scikit learn, pandas, Tensorflow is built on...

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. TGIF!! As I wrap up for the weekend, I remember the times I scrolled endlessly through long Python notebooks just to find one bug. Frustrating 😩 Thanks to a friend who told me about Jupyter shortcuts. Life has changed completely after knowing them. I only use keyboard while coding, and can surely log-off for the weekend early 😀 Sharing a few with you. These will save hours. Should work for most ipynb...

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. Every time you open a website, your browser (let's say Chrome) does the work for you. It sends a request. The server replies with data. Basic internet workflow. With Python's requests library, same can be done - through code. So fetch data, send information (fill a form) or check if the website is live - only in a few lines. Let's see how! 📞 get to ask for data 200 means OK. Request worked and server...

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. 📢 Quick Announcement: At the end I will be sharing a super useful excel tip daily. So, don't miss! Yesterday we saw the lazy processing of itertools and how it handles data to save memory. That was the warm up. There are more tricks up its sleeve. Need product bundles for your store? Or generate size-color combination for your inventory? Most will write endless loops. itertools does this in one line. 🛍️...

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. 🔗 The Merging Problem (itertools) Let's say you have two separate data streams, transaction amount - offline and online . And you need to process them as one continuous flow. sales_offline = [240, 180] sales_online = [870, 910] Standard Python will combine and create a new list. That eats memory (imagine if there are thousands of transactions). Here comes itertools - which processes it like a stream (step...