NewsletterPractical ML, GenAI and full-stack lessons, straight to your inbox. No spam, unsubscribe anytime.
Munna Kumar, also known as Code With Munna (CodeWithMunna / CodeWithMunnaX). Data science, ML and GenAI engineering, built for production and taught for free on YouTube.
Explore
Learn
Work With Me
© 2026 Munna Kumar · Made in India
Back to top
Pandas – Mind Map | CodeWithMunnaX
Complete Pandas Tutorial in PythonMind map · Lesson 12 of 13 Pandas – Mind Map Everything this lesson covers — Introduction to Text Manipulation, Understanding Pandas .str Accessor, Cleaning 'full_name' Column, Cleaning 'email' Column, Cleaning 'phone' Column and Cleaning 'membership_tier' Column — in one visual map. Click any topic to open it, or download the full map as an image for revision.
Mind map
Text Manipulation in Pandas Expand all Collapse all Fit Download PNG
Click a topic to open or close it · drag to move · scroll to zoom · the download includes every topic, fully expanded
Pandas: lesson notes 01 Introduction to Text ManipulationDefinition Processing and cleaning text data in DataFrames Addressing inconsistencies in string values Common Problems Inconsistent casing (e.g., 'Ramesh', 'suresh') Extra spaces (leading, trailing, multiple) Varying formats (e.g., phone numbers, emails) Spelling variations Tools for Manipulation Pandas .str accessor Regular expressions (regex) Standardization levels 02 Understanding Pandas .str AccessorSeries vs StringMethods Direct string methods fail on Series objects Use .str accessor for vectorized string operations type(customers['full_name']) is Seriestype(customers['full_name'].str) is StringMethodsBasic String Methods .strip() removes leading/trailing whitespace.lstrip() removes left whitespace.rstrip() removes right whitespace.upper() converts to uppercase.lower() converts to lowercase.title() converts to title caseImportance of .str Previous lessonPandas Merge(), Join(), Inner Join,… Next lesson Learn Data Cleaning in Pandas
Enables applying string methods to each element of a Series
Converts Series to StringMethods object
Allows chaining multiple string operations 03 Cleaning 'full_name' ColumnInitial Issues Inconsistent casing (e.g., 'Ananya Sharma', 'ROHIT MEHTA') Extra spaces (leading/trailing) Removing Extra Spaces customers['full_name'].str.strip()Removes spaces from both ends Standardizing Case customers['full_name'].str.strip().str.title()Converts first letter of each word to uppercase Splitting Names customers['name_clean'].str.split(' ')Separates string into list of words based on delimiter Access parts by index (e.g., .str[0] for first name) 04 Cleaning 'email' ColumnInitial Issues Different domains (e.g., gmail.com, yahoo.com, outlook.com) Inconsistent '@' symbol representation Missing values (NaN) Filtering with str.contains()df1['email'].str.contains('gmail')Returns boolean Series indicating presence of substring Handling Missing Values (na=False)df1['email'].str.contains('gmail', na=False)Treats NaN values as False instead of NaN Prevents unexpected behavior during filtering Using ~ (Not Operator) ~df1['email'].str.contains('gmail', na=False)Selects emails that do NOT contain 'gmail' 05 Cleaning 'phone' ColumnInitial Data Issues Extra spaces within numbers Inconsistent country codes (e.g., '+91') Varying separators (dashes, spaces) Removing Spaces customers['phone'].str.strip()Ensures clean numbers for pattern matching Filtering by Start/End Pattern customers['phone'].str.startswith('+91')Checks if string begins with specified prefix customers['phone'].str.endswith('0')Checks if string ends with specified suffix 06 Cleaning 'membership_tier' ColumnInitial Data Issues Inconsistent casing (e.g., 'Gold', 'gold', 'GOLD') Spelling variations (e.g., 'Silver', 'Sliver') Standardizing Case customers['membership_tier'].str.strip().str.title()Converts all entries to Title Case for consistency Correcting Spelling Variations .str.replace('Sliver', 'Silver')Replaces specific incorrect substrings with correct ones Used after standardizing case to ensure all variations are caught