Issue running basic functions on datasets

23 views
Skip to first unread message

Jamal Khan

unread,
Dec 11, 2013, 7:07:42 PM12/11/13
to bambo...@googlegroups.com
I've finally got bamboo to work (really excited :)) but when I try the example which is given in the website:

import bamboo as bm


# Turn asyncronous processing off
bm.set_async(False)
url = 'http://formhub.org/mberg/forms/good_eats/data.csv'
dataset = bm.Dataset.create()
dataset.import_from_url(url, na_values=['n/a'])
dataset.schema

After this I try:

dataset.show()

And it fails with :
AttributeError: 'Dataset' object has no attribute 'show'

Any ideas how to fix this?

Thanks! 

Peter Lubell-Doughtie

unread,
Dec 12, 2013, 12:24:01 AM12/12/13
to bambo...@googlegroups.com

Hi Jamal,

Glad to hear you got it working!  For reference, how did you resolve the installation problem?  Did you use the source?

Regarding the `show` method, this is a method on the Datasets controller class but not the Dataset model.  Notice the plural controller and singular model.  The Dataset model is what the bamboo module imports and what you've referenced.  A list of available methods for the Dataset model is in the docs here, http://bamboo.io/docs/models.html#dataset

If you are looking to display the data from this dataset model, you can call `dataset.dframe()` to get back a pandas dataframe (this is what the controller `show` method does).

Hope this helps,
Peter

--
You received this message because you are subscribed to the Google Groups "bamboo-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bamboo-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Jamal Khan

unread,
Dec 21, 2013, 2:43:05 PM12/21/13
to bambo...@googlegroups.com
Hi Peter,

It magically worked after installing the json module and restarting the computer. Thanks for the help!
Reply all
Reply to author
Forward
0 new messages