Skip to content

Instantly share code, notes, and snippets.

@subhsaha
Last active October 13, 2018 16:31
Show Gist options
  • Save subhsaha/fd540c84733ba212170aea690b05dc0b to your computer and use it in GitHub Desktop.
Save subhsaha/fd540c84733ba212170aea690b05dc0b to your computer and use it in GitHub Desktop.
Dictionary to DataFrame
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]}
print(marks) #printing python dictionary directly
pd.DataFrame(marks) #converting it into DataFrame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment