Notebook
In [2]:
# - Will cause an error because I have not bought the Eventvestor data yet
#from quantopian.interactive.data.eventvestor import _13d_filings

# module import provided in the example notebook that is missing the .interactive
#  ( probably a good reason for this post: )
#from quantopian.data.eventvestor import _13d_filings_free

# My fix
from quantopian.interactive.data.eventvestor import _13d_filings_free


# import data operations
from odo import odo
# import other libraries we will use
import pandas as pd

#### Works Fine ########
# Let's use blaze to understand the data a bit using Blaze dshape()
#_13d_filings_free.dshape

#### Works Fine ##########
# And how many rows are there?
# N.B. we're using a Blaze function to do this, not len()
#_13d_filings_free.count()

### Works Fine ###########
# Let's see what the data looks like. We'll grab the first three rows.
#_13d_filings_free[:3]

###### Works Fine ###############
# first we find how Icahn is represented exactly in the `acquiring_entity` column
#icahns = set(filter(lambda x: "Icahn" in x, _13d_filings_free.acquiring_entity))
#icahns

#### Pulling Error on this Segment of Code #########
# Since Carl Icahn is represented in several ways, we use `like` to capture all those ways
names = _13d_filings_free.like(acquiring_entity='*Icahn*')
# now let's filter down to the percentage of shares, timestamp, and sid
names = names[['timestamp', 'percent_shares', 'sid']]
# When displaying a Blaze Data Object, the printout is automatically truncated to ten rows.
names.sort('timestamp')
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-a8e3879abc3e> in <module>()
     34 #### Pulling Error on this Segment of Code #########
     35 # Since Carl Icahn is represented in several ways, we use `like` to capture all those ways
---> 36 names = _13d_filings_free.like(acquiring_entity='*Icahn*')
     37 # now let's filter down to the percentage of shares, timestamp, and sid
     38 names = names[['timestamp', 'percent_shares', 'sid']]

/build/src/qexec_repo/src/blaze/blaze/expr/expressions.py in __getattr__(self, key)
    220             '%s expressions should set _hash in __init__' % type(self).__name__
    221         try:
--> 222             result = object.__getattribute__(self, key)
    223         except AttributeError:
    224             fields = dict(zip(map(valid_identifier, self.fields), self.fields))

AttributeError: 'Field' object has no attribute 'like'