dataset Format

User 2570 | 6/18/2016, 6:39:05 PM

I have a dataset in JSON format, I would like to convert the dataset into a format that is easy to work with using SFRAME, since I am using GraphLab Create, I have seen most of graphlab create examples using a dataset with extension .gl, and also have table like format, who can kindly guide me on how to go about it, how can I process my dataset to a SFRAME, or a .gl format. Thank you

Comments

User 940 | 6/20/2016, 6:10:18 PM

Hi @erigits ,

Does the following help? https://dato.com/products/create/docs/generated/graphlab.SFrame.read_json.html

Cheers! -Piotr


User 2570 | 6/21/2016, 4:46:21 AM

yes so helpful thank you @piotr


User 940 | 6/21/2016, 5:57:51 PM

I'm glad this helped. Don't hesitate to ask any more questions.

Cheers! -Piotr


User 2570 | 6/22/2016, 11:12:55 AM

@piotr I have a dataset with an image column, see attached, column name is imUrl, see attached ( ).

the images are form a URL, but I want to process the same so as I can have an Image column in my dataset in my folder for example see attached ( I was trying to use (graphlab.imageanalysis.loadimages function) but no images shown, can you assist, I will appreciate


User 940 | 6/22/2016, 8:02:11 PM

Hi @erigits ,

Please see http://forum.dato.com/discussion/2150/load-images-from-url-to-a-dataset#latest.

I hope this helps!

Cheers! -Piotr


User 2570 | 6/23/2016, 8:26:43 AM

Thank you, Thank you, it works, this is very helpful @piotr , working soo well, it was giving me headache, thank you soo much, only one error which i think is because may be I dnt have an img column,

NameError Traceback (most recent call last) <ipython-input-7-e4dd2bc9ac33> in <module>() ----> 1 dataset[img] = dataset['imUrl'].apply(lambda x: gl.Image(x))

NameError: name 'img' is not defined


User 940 | 6/23/2016, 6:56:16 PM

Oops, sorry.

It should be dataset['img'] = dataset['imUrl'].apply(lambda x: gl.Image(x)). I forgot to put img as a string.

Hope this helps!

Cheers! -Piotr


User 2570 | 6/26/2016, 9:07:14 AM

@piotr , thank you so much, this is working good, thank you for you kind assistance and help