Skip to content

Instantly share code, notes, and snippets.

@subhsaha
Last active October 21, 2018 11:27
Show Gist options
  • Save subhsaha/195e1c79a71d9a842c4e1f7e0f6ce6cc to your computer and use it in GitHub Desktop.
Save subhsaha/195e1c79a71d9a842c4e1f7e0f6ce6cc to your computer and use it in GitHub Desktop.
import pandas as pd
marks = {'student x':[10,20,30,40,50,60],
'student Y':[80,90,100,10,20,30],
'student Z':[40,50,60,70,80,90]}
df = pd.DataFrame(marks) #creating DataFrame from dictionary
print(df) #printing before renameing
df.rename(columns={'student x':'Week_Number'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment