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. https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=derricksherrill&utm_content=description-only
Support the Channel on Patreon --
https://www.patreon.com/join/derricksherrill
Join The Socials --
Reddit - https://www.reddit.com/r/CodeWithDerrick/
FB - https://www.facebook.com/CodeWithDerrick/
Insta - https://www.instagram.com/codewithderrick/
Twitter - https://twitter.com/codewithderrick
LinkedIn - https://www.linkedin.com/in/derricksherrill/
GitHub - https://github.com/Derrick-Sherrill
*****************************************************************
Full code from the video:
import pandas as pd
excel_file_path = 'office_info.xlsx'
df = pd.read_excel(excel_file_path)
print(df.head(2))
for column in df.columns:
df[column] = df[column].str.replace(r'\W',"")
df.to_excel("removed_characters.xlsx")
https://github.com/Derrick-Sherrill/DerrickSherrill.com/blob/master/remove_characters.py
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:
https://github.com/Derrick-Sherrill/DerrickSherrill.com
Check out my website:
https://www.derricksherrill.com/
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 - https://atom.io/
What Equipment do you use to film videos?
Blue Yeti Microphone - https://amzn.to/2PcNj5d
Mic sound shield - https://amzn.to/3bVNkEt
Soundfoam - https://amzn.to/37NV9ci
Camera desk stand - https://amzn.to/3bX8xhm
Box Lights - https://amzn.to/2PanL95
Side Lights - https://amzn.to/37KSNut
Green Screen - https://amzn.to/37SFFnc
What computer do you use/desk setup?
Film on imac (4k screen) - https://amzn.to/37SEu7g
Work on Macbook Pro - https://amzn.to/2HJ5b3G
Video Storage - https://amzn.to/2Pey8sw
Mouse - https://amzn.to/2PhCtv3
Desk - https://amzn.to/37O1Mv1
Chair - https://amzn.to/2uqHE4E
What editing software do you use?
Adobe CC - https://www.adobe.com/creativecloud.html
Premiere Pro for video editing
Photoshop for images
After Effects for animations
Do I have any courses available?
Yes & always working on more!
https://www.udemy.com/user/derrick-sherrill-2/
Where do I get my music?
I get all my music from the copyright free Youtube audio library
https://www.youtube.com/audiolibrary/music?nv=1
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!
Видео Clean Excel Data With Python Pandas - Removing Unwanted Characters канала Derrick Sherrill
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. https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=derricksherrill&utm_content=description-only
Support the Channel on Patreon --
https://www.patreon.com/join/derricksherrill
Join The Socials --
Reddit - https://www.reddit.com/r/CodeWithDerrick/
FB - https://www.facebook.com/CodeWithDerrick/
Insta - https://www.instagram.com/codewithderrick/
Twitter - https://twitter.com/codewithderrick
LinkedIn - https://www.linkedin.com/in/derricksherrill/
GitHub - https://github.com/Derrick-Sherrill
*****************************************************************
Full code from the video:
import pandas as pd
excel_file_path = 'office_info.xlsx'
df = pd.read_excel(excel_file_path)
print(df.head(2))
for column in df.columns:
df[column] = df[column].str.replace(r'\W',"")
df.to_excel("removed_characters.xlsx")
https://github.com/Derrick-Sherrill/DerrickSherrill.com/blob/master/remove_characters.py
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:
https://github.com/Derrick-Sherrill/DerrickSherrill.com
Check out my website:
https://www.derricksherrill.com/
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 - https://atom.io/
What Equipment do you use to film videos?
Blue Yeti Microphone - https://amzn.to/2PcNj5d
Mic sound shield - https://amzn.to/3bVNkEt
Soundfoam - https://amzn.to/37NV9ci
Camera desk stand - https://amzn.to/3bX8xhm
Box Lights - https://amzn.to/2PanL95
Side Lights - https://amzn.to/37KSNut
Green Screen - https://amzn.to/37SFFnc
What computer do you use/desk setup?
Film on imac (4k screen) - https://amzn.to/37SEu7g
Work on Macbook Pro - https://amzn.to/2HJ5b3G
Video Storage - https://amzn.to/2Pey8sw
Mouse - https://amzn.to/2PhCtv3
Desk - https://amzn.to/37O1Mv1
Chair - https://amzn.to/2uqHE4E
What editing software do you use?
Adobe CC - https://www.adobe.com/creativecloud.html
Premiere Pro for video editing
Photoshop for images
After Effects for animations
Do I have any courses available?
Yes & always working on more!
https://www.udemy.com/user/derrick-sherrill-2/
Where do I get my music?
I get all my music from the copyright free Youtube audio library
https://www.youtube.com/audiolibrary/music?nv=1
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!
Видео Clean Excel Data With Python Pandas - Removing Unwanted Characters канала Derrick Sherrill
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Easy Spreadsheet Data Analysis Methods - Python Pandas TutorialClean Excel Data with Python and Pandas - 5 Minute Python Scripts - Full Code Along WalkthroughBuilding a Machine Learning (Artificial Neural Network) Model - Python Data Science Intro ProjectHow do I filter rows of a pandas DataFrame by column value?Daniel Chen: Cleaning and Tidying Data in Pandas | PyData DC 2018Python Automation for Remote Worker Series | Automate Website InteractionsPython Pandas Tutorial (Part 6): Add/Remove Rows and Columns From DataFramesWriting a Python Script to Control my Lights | Five Minute Python ScriptsMy top 25 pandas tricksSolving real world data science tasks with Python Pandas!Binary Search Algorithm Explained (Full Code Included) - Python Algorithms Series for BeginnersAutomate Multiple Sheet Excel Reporting - Python Automation Tutorial | Full Code Walk Through (2019)Replace Excel Vlookup with Python - Five Minute Python ScriptsPython Tutorial: re Module - How to Write and Match Regular Expressions (Regex)How do I select multiple rows and columns from a pandas DataFrame?Python Pandas Tutorial (Part 5): Updating Rows and Columns - Modifying Data Within DataFramesComplete Python Pandas Data Science Tutorial! (Reading CSV/Excel files, Sorting, Filtering, Groupby)Separate Excel Data into Workbooks by Column Values - Python Pandas TutorialAutomate Excel With Python - Python Excel Tutorial (OpenPyXL)