Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Renaming and replacing the column variable name

income.columns = income.columns.str.replace('Y' , 'Year ')
income.columns
Comment

Renaming a column

ALTER TABLE table_name 
RENAME COLUMN column_name TO new_column_name;
Code language: SQL (Structured Query Language) (sql)
Comment

Rename a column

df.rename(columns={"Airline": "Airline_Code", "AirportFrom":"Airport_From"})
Comment

PREVIOUS NEXT
Code Example
Python :: print torch model python 
Python :: how to get a character from a string in python 
Python :: how to declare a lambda function in python 
Python :: python remove second occurrence of character in string 
Python :: df mask 
Python :: django swagger 
Python :: Accessing elements from a Python Nested Dictionary 
Python :: python web app 
Python :: mixpanel export api 
Python :: subplots 
Python :: Python script to SSH to server and run command 
Python :: Generate bar plot python 
Python :: inheritance in python 3 example 
Python :: code example of sum of the first n odd numbers using for loop 
Python :: matplot image axis 
Python :: xlrd documentation 
Python :: django model functions 
Python :: jupyter notebook not opening 
Python :: phyton datetime comparison 
Python :: select element using Css selector in python 
Python :: reverse a list in python 
Python :: parse email python 
Python :: django template in views.py 
Python :: how to iterate row wise using 2d integer array in python 
Python :: python - merge and incluse only specific columns 
Python :: traversal tree in python 
Python :: virtual environment python 
Python :: iteration 
Python :: creating a dictionary 
Python :: python tuple example 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =