Remove Unwanted Parts from Strings in a Column of Dataframe - Python Automation and Machine Learning for ICs - - An Online Book - |
||||||||
Python Automation and Machine Learning for ICs http://www.globalsino.com/ICs/ | ||||||||
Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix | ||||||||
================================================================================= Removed unwanted non-number characters, and then convert the strings to integers . Code: ============================================ Removed the characters which are not in date format. Code: ============================================ Remove the date in strings. Code: ============================================ [^\w\s] is used to match any non-alphanumeric and non-whitespace characters, and they are replaced with an empty string. Code: ============================================
|
||||||||
================================================================================= | ||||||||
|
||||||||