Exemple #1
0
            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')
Exemple #2
0
            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')
Exemple #3
0
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'
Exemple #4
0
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')
Exemple #5
0
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'}
Exemple #6
0
        def bogus_adapt(self, collection, **context):
            df = collection.to_dataframe()
            df['b'] = 42  # add a column with some dataframe here

            return df