Answers for "remove whitespace from string in python column"

1

Python function remove all whitespace from all character columns in dataframe

df.columns = df.columns.str.replace(' ', '')
Posted by: Guest on December-24-2020
0

how to remove whitespace from string in python

def remove_witespace(data_of_string):
    string = ""
    for char in data_of_string:
        if " " not in char:
            string = string + char
            
    return string
print(remove_witespace("python is amazing programming language"))
Posted by: Guest on December-22-2021

Code answers related to "remove whitespace from string in python column"

Python Answers by Framework

Browse Popular Code Answers by Language