File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -15,26 +15,28 @@ title: Training Word2Vec
15
15
16
16
## Colab Setup
17
17
18
- Run this code to enable helper functions.
18
+ Run this code to enable helper functions and read data back in .
19
19
20
20
21
21
``` python
22
22
# Run this cell to mount your Google Drive.
23
23
from google.colab import drive
24
24
drive.mount(' /content/drive' )
25
25
26
- # Set workshop directory
26
+ # Show existing colab notebooks and helpers.py file
27
27
from 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))
29
30
30
- # Add helper functions to colab's path
31
+ # Add folder to colab's path so we can import the helper functions
31
32
import sys
32
- helper_path = wksp_dir + ' /code'
33
- sys.path.insert(0 , helper_path)
33
+ sys.path.insert(0 , wksp_dir)
34
34
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" )
37
38
```
39
+
38
40
~~~
39
41
Mounted at /content/drive
40
42
['analysis.py',
You can’t perform that action at this time.
0 commit comments