Using python 3.5
In yahoo finance I downloaded banknifty .csv
the sheet needs to depict three coin toss per day. At random time . However i couldnt automate the date to repeat three times before next date kicks in.help please
Using python 3.5
In yahoo finance I downloaded banknifty .csv
the sheet needs to depict three coin toss per day. At random time . However i couldnt automate the date to repeat three times before next date kicks in.help please
Without your code it isn't clear, however here are 3 options for grabbing the day from a date in a string:
from datetime import datetime
import calendar
d='10/24/2016' #Oct 24th, 2016
m_date=datetime.strptime(d,"%m/%d/%Y")
print "Your date:",m_date
print "Option 1: ",calendar.day_name[m_date.weekday()]
print "Option 2: ",datetime.today().weekday()
print "Option 3: ",datetime.today().strftime("%A")