Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Python Adding Matrix with Variables in Jupyter Notebook

  1. Dec 5, 2016 #1

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    i All,
    I have a Jupyter Python Notebook with data like below:
    \
    upload_2016-12-5_17-9-31.png

    I want to create an SFrame with 2 columns and 11 rows.Each row has two entries:
    One containing the name of each word and the other entry containing the total count of the word. The words are part of a list called 'Selected Words' . I am kind of clueless,
    I know how to create new columns for an existing SFrame, but no clue for how to create a new SFrame, or some other Python Data Structure. The best I have is :

    for word in selected_words:
    count[word]=products[word].sum()
    print [word, count[word]]

    Any Ideas?
    Thanks.
     
  2. jcsd
  3. Dec 11, 2016 #2
    Thanks for the thread! This is an automated courtesy bump. Sorry you aren't generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post? The more details the better.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Adding Matrix with Variables in Jupyter Notebook
  1. C# Adding Program (Replies: 5)

Loading...