In [ ]:
import random
In [ ]:
random.randrange(50,500)
In [ ]:
str(random.randrange(50,500))
In [ ]:
print (“Hello ” + str(random.randrange(50,500)))
In [ ]:
int((1 + 2) / 3)
In [ ]:
int((2 + 2) / 3)
In [ ]:
int((3 + 2) / 3)
In [ ]:
for i in range(12):
print (str(i + 1) + ” -> ” + str(int((i + 3) / 3)) )
In [ ]:
from datetime import date
from dateutil.relativedelta import relativedelta
days_back = 1
days_total = 2
startDt = date.today() + relativedelta(days=+(-1 * days_back))
for dateOff in range(days_total):
dimDate = startDt + relativedelta(days=+dateOff)
dateYear = dimDate.year
fiscalPer = str (dimDate.year) + ‘m’ + str(dimDate.month)
calQuarter = int((dimDate.month + 2) / 3)
for hr in range(24):
primaryKey = ‘k’ + str(dateOff * 24 + hr)
print (primaryKey, dimDate, dateYear, fiscalPer, calQuarter, hr)
print ((dateOff + 1) * 24)
In [ ]:
run LoadTitanic.py
In [ ]:
list(titanic_ppl.columns.values)
In [ ]:
titanic_ppl.count()
In [ ]:
len(titanic_ppl)
In [ ]:
run dimPeople.py
In [ ]:
run LoadFromDatabase.py
In [ ]:
print (is_it_a_state(‘NH’))
In [ ]: