Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pandas rename columns whitespace with underscore

dataframe.columns = list(map(lambda x: x.replace(' ', '_'),
                                 dataframe.columns))
Comment

PREVIOUS NEXT
Code Example
Python :: return variable python 
Python :: geopandas change column name 
Python :: Insert between Characters Python 
Python :: python selenium click on agree button 
Python :: seaborn documentation x axis range 
Python :: python if file exist 
Python :: all combinations 
Python :: plotly facet_grid python 
Python :: write a python program to find the second largest number in a list 
Python :: if-else Conditional Statement in Python 
Python :: airflow schedule interval timezone 
Python :: python using end keyword 
Python :: name columns pandas 
Python :: how to define number in python 
Python :: numeric up down python tkinter 
Python :: #Function in python 
Python :: for in print 
Python :: how to use a class in python 
Python :: gfg placement course 
Python :: how to sort values in python 
Python :: how to concatenate two strings in python 
Python :: automl classification tutorial sklearn 
Python :: ner spacy 
Python :: np.random.choice 
Python :: how to refer to all columns in pandas 
Python :: python skip input 
Python :: drf serializer 
Python :: optional parameter in python 
Python :: how to print a message in python 
Python :: typeerror: 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =