Created
September 18, 2022 13:33
-
-
Save saaeiddev/45b4c70b0fc7fcc7c792d92a62bceff2 to your computer and use it in GitHub Desktop.
pandas series
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
import pandas as pd | |
# pandas series | |
a = [1, 7, 2] | |
myvar = pd.Series(a) | |
print(myvar) | |
calories = {"day1" : 400 , "day2" : 600 , "day3" : 700} | |
myvar2 = pd.Series(calories) | |
print(myvar2) | |
prices = { | |
"bmw":500 , "benz":800 , "toyota":1000 , "porsche":2000 | |
} | |
myvar3 = pd.Series(prices) | |
print(myvar3) | |
heights = { | |
"john":176 , "chris":180 , "jimmy":190 | |
} | |
myvar3 = pd.Series(heights) | |
print(myvar3) | |
#----------------------------------------------------------------------------------- | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment