I'm kinda new in python and tensorflow. I want to run my Deep network on a collab for human activity recognition. The problem is I don't know how to import my dataset to collab! I already did upload dataset to Drive. (The dataset link is in below) http://www.cis.fordham.edu/wisdm/dataset.php and I want to just use the WISDM_ar_v1.1_raw.txt file
Asked
Active
Viewed 3,371 times
0
-
1Possible duplicate of [Import data into Google Colaboratory](https://stackoverflow.com/questions/46986398/import-data-into-google-colaboratory) – Jacob Tomlinson Nov 14 '18 at 12:53
4 Answers
1
You got to mount your google drive in your notebook
from google.colab import drive
drive.mount('/content/drive')

ares
- 494
- 4
- 10
-
I already did! Now how to import data? sth like this? dataset = read_data('/content/drive/My Drive/app/WISDM_ar_latest.tar.gz/WISDM_ar_v1.1/WISDM_ar_v1.1_raw.txt') – mj.beyrami Nov 14 '18 at 13:03
-
0
column_names = ['user-id','activity','timestamp', 'x-axis', 'y-axis', 'z-axis'] data = pd.read_csv(('My Drive/app/WISDM_ar_latest.tar.gz/WISDM_ar_v1.1/WISDM_ar_v1.1_raw.txt',header = None, names = column_names)
File "<ipython-input-26-033bf3a3f419>", line 2
data = pd.read_csv(('My Drive/app/WISDM_ar_latest.tar.gz/WISDM_ar_v1.1/WISDM_ar_v1.1_raw.txt',header = None, names = column_names)
^
SyntaxError: invalid syntax

mj.beyrami
- 49
- 1
- 7
0
Okey It's solved now! All think you need to do is just upload or data to your drive. (I uploaded in folder name: "app") Then
from google.colab import drive
drive.mount('/content/drive/')
Now by this code you can import the data (Edit: Moved drive.mount to next line):
data = pd.read_csv("/content/drive/My Drive/app/WISDM_ar_v1.1_raw.txt")

vezunchik
- 3,669
- 3
- 16
- 25

mj.beyrami
- 49
- 1
- 7