Adding Matrix with Variables in Jupyter Notebook

  • Context: Python 
  • Thread starter Thread starter WWGD
  • Start date Start date
  • Tags Tags
    Matrix Variables
Click For Summary
SUMMARY

The discussion focuses on creating an SFrame in a Jupyter Notebook using Python, specifically for managing word counts from a list called 'Selected Words'. The user seeks guidance on initializing a new SFrame with two columns: one for the word names and another for their respective counts. The provided code snippet demonstrates an attempt to count occurrences of each word but lacks the implementation for creating the SFrame itself.

PREREQUISITES
  • Familiarity with Jupyter Notebook and Python programming
  • Understanding of SFrame data structures in Turi Create
  • Basic knowledge of Python dictionaries for counting occurrences
  • Experience with iterating over lists in Python
NEXT STEPS
  • Learn how to create an SFrame using Turi Create
  • Research Python dictionary methods for counting elements
  • Explore data manipulation techniques in Jupyter Notebook
  • Study examples of using SFrames for data analysis
USEFUL FOR

This discussion is beneficial for data scientists, Python developers, and anyone working with text data analysis in Jupyter Notebook, particularly those using Turi Create for data manipulation.

WWGD
Science Advisor
Homework Helper
Messages
7,806
Reaction score
13,120
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.
 

Similar threads

  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 12 ·
Replies
12
Views
9K
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 7 ·
Replies
7
Views
6K
  • · Replies 10 ·
Replies
10
Views
2K