Using python 3.5

In yahoo finance I downloaded banknifty .csv

enter image description here

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


closed as off-topic by user16651, Bob Jansen Oct 25 '16 at 9:17

  • This question does not appear to be about quantitative finance within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ If you don't understand python well enough to do this, you could easily do it with excel. $\endgroup$ – John Oct 24 '16 at 19:37
  • $\begingroup$ please post the code you're using. you're telling that you have the numbers and want to create a column with the days of the week? Ex.: '24/oct/2016' = 'monday' ? $\endgroup$ – dot.Py Oct 24 '16 at 23:27
  • $\begingroup$ The, exactly like what you have mentioned. 24 Oct 2016= Monday. Then I could just choose Thursday's data. And analyse it. I have been coding since a month in python. $\endgroup$ – sujith Oct 25 '16 at 3:34
  • $\begingroup$ This is more suitable for StackOverflow but needs too much editing for me to migrate. $\endgroup$ – Bob Jansen Oct 25 '16 at 9:17
  • $\begingroup$ I'm voting to close this question as off-topic because not a fit here, not fit for migration. $\endgroup$ – Bob Jansen Oct 25 '16 at 9:17

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
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")

Not the answer you're looking for? Browse other questions tagged or ask your own question.