Rename Columns of pandas DataFrame in Python (2 Examples) | Change Variable Names | rename Function

preview_player
Показать описание
Python code of this video:

import pandas as pd # Load pandas

data = pd.DataFrame({"x1":range(7, 1, - 1), # Create pandas DataFrame
"x2":["a", "b", "c", "d", "e", "f"],
"x3":["X", "Y", "X", "X", "Y", "X"]})
print(data) # Print pandas DataFrame

print(data_new1) # Print updated pandas DataFrame

print(data_new2) # Print updated pandas DataFrame

Follow me on Social Media:

Рекомендации по теме
welcome to shbcf.ru