Scikit Learn Machine Learning Tutorial for investing with Python p. 6

In this machine learning with Python and scikit-learn tutorial video, we cover how to use the Pandas module to help structure and modify our data.

No Pandas? No problem:
Windows users:

sample code:

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6


  1. rafalpilat145 says:

    If i look in the CSV file, in my file, the ticker starts at rok and other
    companies like appl arent even there. Any ideas why this might be the case?
    (Im on Ubuntu so that might be the problem)

  2. Darron Pressley says:

    Hi Sentdex

    Is your code for this available to download, I have typed it in and get

    value = source.split(gather + ‘:


    IndexError: list index out of range

    I know its probably a typo but I am going cross eyed trying to find it.

  3. Leonardo Celente says:

    WOW! 40 seconds! That took me 5 minutes in 30% of my FX-6100, I bet you’re
    using an i7, those things are productivity MONSTERS!

    And by the way thanks for the tutorials, great content and simplicity.
    YouTube needs more people like you.

  4. RM C says:

    Just a thought but maybe try SortedContainers for your data append. It’ll
    be faster than Pandas as it wont do the dataframe copy (which it does on an
    append), and then finally convert to a dataframe at the end; which is a

  5. ZA says:

    using Mac, Anaconda gets this error.

    ticker = each_dir.split(“\”)[1]
    IndexError: list index out of range

  6. James Kao says:

    Some of source files are have a newline between the closing ‘‘ and


    Other files are missing ‘Total Debt/Equity (mrq)’ altogether.

    Here’s how I resolved it:
    if gather + ‘:

    ‘ in source:
    value = source.split(gather + ‘:‘)[1].split(‘


    value = ‘N/A’
    print ticker + ‘:’ + value

    Awesome tutorial thus far Harrison!

  7. a s says:

    thanks for the video. one question, at the end I run the file, now where
    exactly is my saved csv file?
    I cannot locate it for the love of ….. thanks.

  8. Surelyourejoking says:

    Don’t normally leave comments, but these videos are fantastic! Well done,
    keep up the amazing work!

  9. 张翼 says:

    I had no Programming language experience and start watching ur video after
    taking python class in codecademy. These are really great videos and I
    learned a lot from here, thx very much.

    May I have a basic question: When I forget to type “df = ” in code:

    “df = df.append({‘Date’:date_stamp,’Unix’:unix_time,’Ticker’:ticker,’DE
    Ratio’:value,}, ignore_index = True)”

    nothing is in .csv file produced, why?

Comments are closed.