Adding Matrix with Variables in Jupyter Notebook

  • Context: Python 
  • Thread starter Thread starter WWGD
  • Start date Start date
  • Tags Tags
    Matrix Variables
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
0 replies · 3K views
Messages
7,825
Reaction score
13,152
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.