.. _l-methods: Methods ======= .. contents:: :local: :depth: 1 Summary +++++++ +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | method | class parent | truncated documentation | +=======================================================================================================+===============================+=========================================================================================================================================+ | :py:meth:`__add__ ` | StreamingSeries | Does an addition on every value hoping that has a meaning. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__del__ ` | StreamingDataFrame | Calls every function in `_delete_`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__del__ ` | StreamingSeries | Calls every function in `_delete_`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getitem__ ` | StreamingDataFrame | Implements some of the functionalities :epkg:`pandas` offers for the operator ``[]``. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getitem__ ` | StreamingSeries | Implements some of the functionalities :epkg:`pandas` offers for the operator ``[]``. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | StreamingDataFrame | | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | StreamingSeries | | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | JsonIterator2Stream | | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | JsonPerRowsStream | | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | StreamingInefficientException | This method is inefficient in streaming mode and not implemented. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__iter__ ` | StreamingDataFrame | Iterator on a large file with a sliding window. Each windows is a :epkg:`DataFrame`. The method stores a ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__iter__ ` | StreamingSeries | Iterator on a large file with a sliding window. Each windows is a :epkg:`DataFrame`. The method stores a ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__iter__ ` | JsonIterator2Stream | Iterates on each row. The behaviour is a bit tricky. It is implemented to be swalled by :func:`pandas.read_json` ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setitem__ ` | StreamingDataFrame | Limited set of operators are supported. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setitem__ ` | StreamingSeries | Limited set of operators are supported. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_concath ` | StreamingDataFrame | | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_concath ` | StreamingSeries | | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_concatv ` | StreamingDataFrame | | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_concatv ` | StreamingSeries | | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_reservoir_sampling ` | StreamingDataFrame | Uses the `reservoir sampling `_ algorithm to draw a random sample ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_reservoir_sampling ` | StreamingSeries | Uses the `reservoir sampling `_ algorithm to draw a random sample ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_column ` | StreamingDataFrame | Implements some of the functionalities :epkg:`pandas` offers for the operator ``[]``. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_column ` | StreamingSeries | Implements some of the functionalities :epkg:`pandas` offers for the operator ``[]``. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`apply ` | StreamingDataFrame | Applies :epkg:`pandas:DataFrame:apply`. This function returns a :class:`StreamingDataFrame`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`apply ` | StreamingSeries | Applies :epkg:`pandas:Series:apply`. This function returns a :class:`StreamingSeries`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`applymap ` | StreamingDataFrame | Applies :epkg:`pandas:DataFrame:applymap`. This function returns a :class:`StreamingDataFrame`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`applymap ` | StreamingSeries | Applies :epkg:`pandas:DataFrame:applymap`. This function returns a :class:`StreamingDataFrame`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`concat ` | StreamingDataFrame | Concatenates :epkg:`dataframes`. The function ensures all :epkg:`pandas:DataFrame` or :class:`StreamingDataFrame` ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`concat ` | StreamingSeries | Concatenates :epkg:`dataframes`. The function ensures all :epkg:`pandas:DataFrame` or :class:`StreamingDataFrame` ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`describe ` | StreamingDataFrame | Calls :epkg:`pandas:DataFrame:describe` on every piece of the datasets. *percentiles* are not really accurate ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`describe ` | StreamingSeries | Calls :epkg:`pandas:DataFrame:describe` on every piece of the datasets. *percentiles* are not really accurate ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`drop ` | StreamingDataFrame | Applies :epkg:`pandas:DataFrame:drop`. This function returns a :class:`StreamingDataFrame`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`drop ` | StreamingSeries | Applies :epkg:`pandas:DataFrame:drop`. This function returns a :class:`StreamingDataFrame`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`ensure_dtype ` | StreamingDataFrame | Ensures the :epkg:`dataframe` *df* has types indicated in dtypes. Changes it if not. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`ensure_dtype ` | StreamingSeries | Ensures the :epkg:`dataframe` *df* has types indicated in dtypes. Changes it if not. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`fillna ` | StreamingDataFrame | Replaces the missing values, calls :epkg:`pandas:DataFrame:fillna`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`fillna ` | StreamingSeries | Replaces the missing values, calls :epkg:`pandas:DataFrame:fillna`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_kwargs ` | StreamingDataFrame | Returns the parameters used to call the constructor. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_kwargs ` | StreamingSeries | Returns the parameters used to call the constructor. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`getvalue ` | JsonPerRowsStream | Returns the whole stream content. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`groupby ` | StreamingDataFrame | Implements the streaming :epkg:`pandas:DataFrame:groupby`. We assume the result holds in memory. The out-of-memory ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`groupby ` | StreamingSeries | Implements the streaming :epkg:`pandas:DataFrame:groupby`. We assume the result holds in memory. The out-of-memory ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`groupby_streaming ` | StreamingDataFrame | Implements the streaming :epkg:`pandas:DataFrame:groupby`. We assume the result holds in memory. The out-of-memory ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`groupby_streaming ` | StreamingSeries | Implements the streaming :epkg:`pandas:DataFrame:groupby`. We assume the result holds in memory. The out-of-memory ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`head ` | StreamingDataFrame | Returns the first rows as a :epkg:`DataFrame`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`head ` | StreamingSeries | Returns the first rows as a :epkg:`DataFrame`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`is_stable ` | StreamingDataFrame | Tells if the :epkg:`dataframe` is supposed to be stable. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`is_stable ` | StreamingSeries | Tells if the :epkg:`dataframe` is supposed to be stable. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`iterrows ` | StreamingDataFrame | See :epkg:`pandas:DataFrame:iterrows`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`iterrows ` | StreamingSeries | See :epkg:`pandas:DataFrame:iterrows`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`merge ` | StreamingDataFrame | Merges two :class:`StreamingDataFrame` and returns :class:`StreamingDataFrame`. *right* can be either a :class:`StreamingDataFrame` ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`merge ` | StreamingSeries | Merges two :class:`StreamingDataFrame` and returns :class:`StreamingDataFrame`. *right* can be either a :class:`StreamingDataFrame` ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`read ` | JsonIterator2Stream | Reads the next item and returns it as a string. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`read ` | JsonPerRowsStream | Reads characters, adds ``,``, ``[``, ``]`` if needed. So the number of read characters is not recessarily ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`readline ` | JsonPerRowsStream | Reads a line, adds ``,``, ``[``, ``]`` if needed. So the number of read characters is not recessarily the ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`sample ` | StreamingDataFrame | See :epkg:`pandas:DataFrame:sample`. Only *frac* is available, otherwise choose :meth:`reservoir_sampling`. ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`sample ` | StreamingSeries | See :epkg:`pandas:DataFrame:sample`. Only *frac* is available, otherwise choose :meth:`reservoir_sampling`. ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`seek ` | JsonIterator2Stream | Change the stream position to the given byte offset. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`seek ` | JsonPerRowsStream | Change the stream position to the given byte offset. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`sort_values ` | StreamingDataFrame | Sorts the streaming dataframe by values. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`sort_values ` | StreamingSeries | Sorts the streaming dataframe by values. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`tail ` | StreamingDataFrame | Returns the last rows as a :epkg:`DataFrame`. The size of chunks must be greater than ``n`` to get ``n`` ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`tail ` | StreamingSeries | Returns the last rows as a :epkg:`DataFrame`. The size of chunks must be greater than ``n`` to get ``n`` ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_csv ` | StreamingDataFrame | Saves the :epkg:`DataFrame` into string. See :epkg:`pandas:DataFrame.to_csv`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_csv ` | StreamingSeries | Saves the :epkg:`DataFrame` into string. See :epkg:`pandas:DataFrame.to_csv`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_dataframe ` | StreamingDataFrame | Converts everything into a single :epkg:`DataFrame`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_dataframe ` | StreamingSeries | Converts everything into a single :epkg:`DataFrame`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_df ` | StreamingDataFrame | Converts everything into a single :epkg:`DataFrame`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_df ` | StreamingSeries | Converts everything into a single :epkg:`DataFrame`. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`train_test_split ` | StreamingDataFrame | Randomly splits a :epkg:`dataframe` into smaller pieces. The function returns streams of file names. It ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`train_test_split ` | StreamingSeries | Randomly splits a :epkg:`dataframe` into smaller pieces. The function returns streams of file names. It ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`where ` | StreamingDataFrame | Applies :epkg:`pandas:DataFrame:where`. *inplace* must be False. This function returns a :class:`StreamingDataFrame`. ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`where ` | StreamingSeries | Applies :epkg:`pandas:DataFrame:where`. *inplace* must be False. This function returns a :class:`StreamingDataFrame`. ... | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`write ` | JsonIterator2Stream | The class does not write. | +-------------------------------------------------------------------------------------------------------+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+