@@ -125,22 +125,17 @@ def to_timeseries(self, fieldnames=(), verbose=True,
125125 defined in the ``__unicode__`` or ``__str__``
126126 methods of the related class definition
127127 """
128- if index is None :
129- raise AssertionError ('You must supply an index field' )
130- if storage not in ('wide' , 'long' ):
131- raise AssertionError ('storage must be wide or long' )
128+ assert index is not None , 'You must supply an index field'
129+ assert storage in ('wide' , 'long' ), 'storage must be wide or long'
132130 if rs_kwargs is None :
133131 rs_kwargs = {}
134132
135133 if storage == 'wide' :
136134 df = self .to_dataframe (fieldnames , verbose = verbose , index = index )
137135 else :
138136 df = self .to_dataframe (fieldnames , verbose = verbose )
139- if values is None :
140- raise AssertionError ('You must specify a values field' )
141-
142- if pivot_columns is None :
143- raise AssertionError ('You must specify pivot_columns' )
137+ assert values is not None , 'You must specify a values field'
138+ assert pivot_columns is not None , 'You must specify pivot_columns'
144139
145140 if isinstance (pivot_columns , (tuple , list )):
146141 df ['combined_keys' ] = ''
@@ -190,11 +185,8 @@ def to_dataframe(self, fieldnames=(), verbose=True, index=None,
190185
191186 """
192187
193- df = read_frame (self , fieldnames = fieldnames , verbose = verbose ,
194- index_col = index ,
195- coerce_float = coerce_float )
196-
197- return df
188+ return read_frame (self , fieldnames = fieldnames , verbose = verbose ,
189+ index_col = index , coerce_float = coerce_float )
198190
199191
200192class DataFrameManager (PassThroughManager ):
0 commit comments