Skip to content

Instantly share code, notes, and snippets.

@saaeiddev
Created September 18, 2022 13:33
Show Gist options
  • Save saaeiddev/45b4c70b0fc7fcc7c792d92a62bceff2 to your computer and use it in GitHub Desktop.
Save saaeiddev/45b4c70b0fc7fcc7c792d92a62bceff2 to your computer and use it in GitHub Desktop.
pandas series
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