In [1]:
# remove comment to use latest development version
import sys; sys.path.insert(0, '../')
In [2]:
# import libraries
import raccoon as rc
In [3]:
from blist import blist
In [4]:
# Construct with blist
df_blist = rc.DataFrame({'a': [1, 2, 3]}, index=[5, 6, 7], dropin=blist)
In [5]:
# see that the data structures are all blists
df_blist.data
Out[5]:
In [6]:
df_blist.index
Out[6]:
In [7]:
df_blist.columns
Out[7]:
In [8]:
# the dropin class
df_blist.dropin
Out[8]:
All the standard functionality works exactly the same
In [9]:
df_blist[6, 'a']
Out[9]:
In [10]:
df_blist[8, 'b'] = 44
print(df_blist)
Works for Series as well
In [11]:
# Construct with blist=True, the default
srs_blist = rc.Series([1, 2, 3], index=[5, 6, 7], dropin=blist)
In [12]:
# see that the data structures are all blists
srs_blist.data
Out[12]:
In [13]:
srs_blist.index
Out[13]: