Clean Excel Data With Python Pandas – Removing Unwanted Characters

Channel Avatar
Clean Excel Data With Python Pandas - Removing Unwanted Characters
Clean Excel Data With Python Pandas – Removing Unwanted Characters
Hey Everyone, in this one we’re looking at the replace method in pandas to remove characters from your spreadsheet columns.

Be sure to post what you want to see next!

Kite helps fund the channel, thanks for checking them out and supporting me —
Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing.

Support the Channel on Patreon —
Join The Socials —
Reddit –
FB –
Insta –
Twitter –
LinkedIn –
GitHub –
Full code from the video:

import pandas as pd

excel_file_path ‘office_info.xlsx’
df pd.read_excel(excel_file_path)


for column in df.columns:
df[column] df[column].str.replace(r’//W’,/”/”)


Packages (& Versions) used in this video:
Python 3.8
Pandas 0.25
Atom 1.41

Code from this tutorial and all my others can be found on my GitHub:

Check out my website:

If you liked the video – please hit the like button. It means more than you know. Thanks for watching and thank you for all your support!!

— Channel FAQ —

What text editor do you use?
Atom –

What Equipment do you use to film videos?
Blue Yeti Microphone –
Mic sound shield –
Soundfoam –
Camera desk stand –
Box Lights –
Side Lights –
Green Screen –

What computer do you use/desk setup?
Film on imac (4k screen) –
Work on Macbook Pro –
Video Storage –
Mouse –
Desk –
Chair –

What editing software do you use?
Adobe CC –
Premiere Pro for video editing
Photoshop for images
After Effects for animations

Do I have any courses available?
Yes & always working on more!

Where do I get my music?
I get all my music from the copyright free Youtube audio library

Let me know if there’s anything else you want answered!


Always looking for suggestions on what video to make next — leave me a comment with your project! Happy Coding!

Take the opportunity to connect and share this video with your friends and family if you find it useful.

Keywords: Python, Python Automation, Tutorial, How To, Derrick Sherrill, Clean, Excel, Data, Python Excel, Clean Excel, Worksheets, Spreadsheets, Python Pandas, Pandas, Dataframe, Clean Data, Regular Expressions, Regex

Read Also

Leave a Reply

Your email address will not be published. Required fields are marked *