General Info
Import Export
Data Processing
Analysis
Machine Learning
Useful Snippets
×
- Extract Date Component from DateTime
- Date Calculations and filters
- Null Values
- Text Processing functions
- 9.0.12 Apply a function to process text
- 9.0.13 count total characters
- 9.0.14 count total words
- 9.0.15 count occurances of specific word
- 9.0.16 capitalize first letter in sentance
- 9.0.17 capitalize first letter in each word in sentance
- 9.0.18 convert to upper case
- 9.0.19 convert to lower case
- 9.0.20 Remove punctuation from text
- 9.0.21 strip front and back spaces
- 9.0.22 stem words in a string
- 9.0.23 return nth word in a string
- 9.0.24 Return Nth sentance in a string
- 9.0.25 Return Substring between two words
9.0.21 strip front and back spaces
Example:
def strip_front_and_back_spaces(text):
" Removes spaces from the front and back of a string"
text = text.strip()
return(text)