File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,26 +15,28 @@ title: Training Word2Vec
1515
1616## Colab Setup
1717
18- Run this code to enable helper functions.
18+ Run this code to enable helper functions and read data back in .
1919
2020
2121``` python
2222# Run this cell to mount your Google Drive.
2323from google.colab import drive
2424drive.mount(' /content/drive' )
2525
26- # Set workshop directory
26+ # Show existing colab notebooks and helpers.py file
2727from os import listdir
28- wksp_dir = ' /content/drive/My Drive/Colab Notebooks/text-analysis'
28+ wksp_dir = ' /content/drive/My Drive/Colab Notebooks/text-analysis/code'
29+ print (listdir(wksp_dir))
2930
30- # Add helper functions to colab's path
31+ # Add folder to colab's path so we can import the helper functions
3132import sys
32- helper_path = wksp_dir + ' /code'
33- sys.path.insert(0 , helper_path)
33+ sys.path.insert(0 , wksp_dir)
3434
35- # Check that helper directory is correct
36- listdir(helper_path)
35+ # Read the data back in.
36+ from pandas import read_csv
37+ data = read_csv(" /content/drive/My Drive/Colab Notebooks/text-analysis/data/data.csv" )
3738```
39+
3840~~~
3941Mounted at /content/drive
4042['analysis.py',
You can’t perform that action at this time.
0 commit comments