def adapt(self, collection, **context): df = collection.to_dataframe() df['b'] = 42 # add a column with some dataframe here return self.render_return(df, context_var='hep', other_context_var='tup')
def adapt(self, collection, **context): df = collection.to_dataframe() df['c'] = 43 # add a column c with some dataframe here return self.render_return(df, something_else='mups', some_thing='zups')
def adapt_b_to_c_context_bad(collection, **context): df = collection.to_dataframe() df['c'] = 43 # add a column c with some dataframe here return df, 'blah'
def adapt_b_to_c(collection, **context): df = collection.to_dataframe() df['c'] = 43 # add a column c with some dataframe here return df, dict(something_else='mups', some_thing='zups')
def adapt_a_to_b(collection, **context): df = collection.to_dataframe() df['b'] = 42 # add a column b with some dataframe here return df, {'context_var': 'hep', 'other_context_var': 'tup'}
def bogus_adapt(self, collection, **context): df = collection.to_dataframe() df['b'] = 42 # add a column with some dataframe here return df