cuery.context ============= .. py:module:: cuery.context .. autoapi-nested-parse:: Helpers to convert various input formats to iterables of dictionaries. Attributes ---------- .. autoapisummary:: cuery.context.AnyContext Functions --------- .. autoapisummary:: cuery.context.is_iterable cuery.context.iterrecords cuery.context.contexts_from_dataframe cuery.context.contexts_from_dict cuery.context.contexts_from_iterable cuery.context.iter_context cuery.context.context_is_iterable Module Contents --------------- .. py:data:: AnyContext .. py:function:: is_iterable(obj) .. py:function:: iterrecords(df, index = False) Iterate over rows of a DataFrame as dictionaries. .. py:function:: contexts_from_dataframe(df, required) Convert a DataFrame to an interable of dictionaries with variables needed by prompt only. .. py:function:: contexts_from_dict(context, required) Convert a dict of iterables to an iterable of dicts with keys needed by prompt only. .. py:function:: contexts_from_iterable(context, required) Convert an iterable of dicts to an iterable of dicts with keys needed by prompt only. .. py:function:: iter_context(context, required) Ensure context is an iterable of dicts. .. py:function:: context_is_iterable(context) Check if context is iterable.