Created
July 20, 2018 10:42
-
-
Save Manikant92/5dd443736d4e089dc2daa651119cf98a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#dictionary | |
#passing all values of list x into key X in dictionary and similiarly for y | |
dictionary = {'X': x, 'y':y} | |
#import pandas for dataframe. | |
import pandas as pd | |
#call DataFrame method from pandas and pass dictionary variable to it. | |
#and store the dataframe in a variable to access as and when required | |
df = pd.DataFrame(dictionary) | |
#output of dataframe 1st rows -df.head() | |
X y | |
0 1 11 | |
1 2 22 | |
2 3 33 | |
3 4 44 | |
4 5 55 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment