.. _f-dataframeiohelpers: module ``df.dataframe_io_helpers`` ================================== .. inheritance-diagram:: pandas_streaming.df.dataframe_io_helpers Short summary +++++++++++++ module ``pandas_streaming.df.dataframe_io_helpers`` Saves and reads a :epkg:`dataframe` into a :epkg:`zip` file. :githublink:`%|py|6` Classes +++++++ +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +=============================================================================================+======================================================================================================================+ | :class:`JsonIterator2Stream ` | Transforms an iterator on :epkg:`JSON` items into a stream which returns an items as a string every time method ... | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :class:`JsonPerRowsStream ` | Reads a :epkg:`json` streams and adds ``,``, ``[``, ``]`` to convert a stream containing one :epkg:`json` object ... | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ Functions +++++++++ +----------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | function | truncated documentation | +==============================================================================================+================================================================================+ | :func:`enumerate_json_items ` | Enumerates items from a :epkg:`JSON` file or string. | +----------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :func:`flatten_dictionary ` | Flattens a dictionary with nested structure to a dictionary with no hierarchy. | +----------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ Methods +++++++ +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +=============================================================================================+======================================================================================================================+ | :py:meth:`__init__ ` | | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__iter__ ` | Iterates on each row. The behaviour is a bit tricky. It is implemented to be swalled by :func:`pandas.read_json` ... | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`getvalue ` | Returns the whole stream content. | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`read ` | Reads the next item and returns it as a string. | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`read ` | Reads characters, adds ``,``, ``[``, ``]`` if needed. So the number of read characters is not recessarily ... | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`readline ` | Reads a line, adds ``,``, ``[``, ``]`` if needed. So the number of read characters is not recessarily the ... | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`seek ` | Change the stream position to the given byte offset. | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`seek ` | Change the stream position to the given byte offset. | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`write ` | The class does not write. | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: pandas_streaming.df.dataframe_io_helpers :members: :special-members: __init__ :show-inheritance: