Kizspy | Question: 23 (Choose 1 answer)
Suppose you are given a dataframe df.
df = pd.DataFrame({'Click_Id': ['A','B','C','D', 'E'], 'Count':[100,200,300,400,250]})20)
Now you want to change the name of the column 'Count' in df to 'Click_Count'. So, for performing that action you have written the following code.
df.rename(columns = {'Count':'Click_Count'})
What will be the output of print statement below?(Note: Pandas library has been imported as pd)
print df.columns
A. ['Click_Id', 'Click_Count']
B. ['Click_Id', 'Count']
C. ['Click_Id']
D. [Error]