.. _l-functions: Functions ========= .. contents:: :local: :depth: 1 Summary +++++++ +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | function | class parent | truncated documentation | +=====================================================================================================================+==============+===========================================================================================================================+ | :func:`_setup_hook ` | | if this function is added to the module, the help automation and unit tests call it first before anything goes on ... | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`check ` | | Checks the library is working. It raises an exception. If you want to disable the logs: | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`dataframe_hash_columns ` | | Hashes a set of columns in a dataframe. Keeps the same type. Skips missing values. | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`dataframe_shuffle ` | | Shuffles a dataframe. | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`dataframe_unfold ` | | One column may contain concatenated values. This function splits these values and multiplies the rows for each split ... | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`dummy_streaming_dataframe ` | | Returns a dummy streaming dataframe mostly for unit test purposes. | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :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. | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`hash_float ` | | Hashes a float into a float. | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`hash_int ` | | Hashes an integer into an integer. | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`hash_str ` | | Hashes a string. | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`numpy_types ` | | Returns the list of :epkg:`numpy` available types. | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`pandas_fillna ` | | Replaces the :epkg:`nan` values for something not :epkg:`nan`. Mostly used by :func:`pandas_groupby_nan`. | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`pandas_groupby_nan ` | | Does a *groupby* including keeping missing values (:epkg:`nan`). | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`read_zip ` | | Reads a :epkg:`dataframe` from a :epkg:`zip` file. It can be saved by :func:`read_zip`. | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`sklearn_train_test_split ` | | Randomly splits a dataframe into smaller pieces. The function returns streams of file names. The function relies ... | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`sklearn_train_test_split_streaming ` | | Randomly splits a dataframe into smaller pieces. The function returns streams of file names. The function relies ... | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`to_zip ` | | Saves a :epkg:`Dataframe` into a :epkg:`zip` file. It can be read by :func:`to_zip`. | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`train_test_apart_stratify ` | | This split is for a specific case where data is linked in one way. Let's assume we have two ids as we have for online ... | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`train_test_connex_split ` | | This split is for a specific case where data is linked in many ways. Let's assume we have three ids as we have for ... | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+ | :func:`train_test_split_weights ` | | Splits a database in train/test given, every row can have a different weight. | +---------------------------------------------------------------------------------------------------------------------+--------------+---------------------------------------------------------------------------------------------------------------------------+