.. _l-functions: Functions ========= .. contents:: :local: :depth: 1 Summary +++++++ +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | function | class parent | truncated documentation | +===================================================================================================================+==============+==================================================================================================================================+ | :func:`_build_diagram ` | | Inspired from :epkg:`blockdiag` source file (*_bootstrap.py*). | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`_create_fontmap ` | | Inspired from :epkg:`blockdiag` source file (*_bootstrap.py*). | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`_detectfont ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`_is_syntax_is_missing ` | | Downloads the grammar for a specific language if the files is missing. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`_private_test_style_src ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`_private_test_style_test ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :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:`add_missing_indices ` | | After aggregation, it usually happens that the series is sparse. This function adds rows for missing time. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`build_grammar ` | | Compiles the grammar for a specific file. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`check ` | | Checks the library is working. It raises an exception. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`cmap_builder ` | | Returns a colormap object compatible with matplotlib If only parameter **name** is provided, it should be a known matplotlib ... | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`create_database ` | | create a database | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`dBase2df ` | | converts a dBase file into a list of dataframe (one per table) | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`dBase2sqllite ` | | Put all rows from a dBase database into sqlite Add a dbase table to an open sqlite database. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`decompress_bz2 ` | | Decompresses a :epkg:`bz2` file. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`decompress_gz ` | | Decompresses a :epkg:`tar.gz` file. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`decompress_targz ` | | Decompresses a :epkg:`tar.gz` file. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`decompress_zip ` | | Unzips a :epkg:`zip` file. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`df_crossjoin ` | | Make a cross join (cartesian product) between two dataframes by using a constant temporary key. Also sets a MultiIndex ... | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`dot_exe ` | | retrieve graphivz executable | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`download_data ` | | Retrieves a module given its name, a text file or a :epkg:`zip` file, looks for it on ``http://www.xavierdupre.fr/...`` ... | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`draw_diagram ` | | Draws a graph based on module :epkg:`blockdiag`. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`drop_database ` | | remove a database | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`enumerate_grep ` | | Extracts lines matching a regular expression. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`extractall_silent ` | | Extracts all members from the archive to the current working directory and set owner, modification time and permissions ... | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`file_encoding ` | | Returns the encoding of a file. The function relies on `chardet `_. ... | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`file_head ` | | Extracts the first *nbline* of a file (assuming it is text file). | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`file_head_cli ` | | Takes the first lines from a file using function :func:`file_head`. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`file_tail ` | | Extracts the first nbline of a file (assuming it is text file). | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`file_tail_cli ` | | Takes the last lines from a file using function :func:`file_tail`. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`folium_embed_map ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`folium_html_map ` | | Embeds the HTML source of the map directly into the IPython notebook. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`format_file_mtime ` | | Returns a :epkg:`datetime` for a file. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`format_file_size ` | | Formats the file size as string. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`get_default_value_type ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`get_list_database ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`get_list_instance ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`get_list_server ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`get_parser_lexer ` | | Returns two classes, a parser and a lexer from :epkg:`antlr4`. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`get_tree_graph ` | | Returns a graph with :epkg:`networkx`. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`get_tree_string ` | | Returns a string which shows the parsed tree. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`guess_type_value ` | | Guesses the type of a value. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`guess_type_value_type ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`import_flatfile_into_database ` | | Function which imports a file into a database. It the table exists, it removes it first. There is no addition. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`import_flatfile_into_database_pandas ` | | Function which imports a file into a database using pandas. It the table exists, it removes it first. There is no addition. ... | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`lambert932WGPS ` | | Converts Lambert coordinates into longitude, latitude. Does not use :epkg:`pyproj`. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`load_french_departements ` | | Returns the definition of French departments. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`load_ipython_extension ` | | to allow the call ``%load_ext pyensae`` | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`mpl_switch_style ` | | Changes the graph style. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`parse_code ` | | Parses a code and returns a tree. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`plot_map_france ` | | Creates a map for France using :epkg:`cartopy`. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`plot_map_france_polygon ` | | Plots polygons into a map for France. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`r2python ` | | Converts a R script into Python. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`register_file_magics ` | | register magics function, can be called from a notebook | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`register_graph_magics ` | | register magics function, can be called from a notebook | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`register_notebook_magics ` | | register magics function, can be called from a notebook | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`register_sql_magics ` | | register magics function, can be called from a notebook | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`remove_empty_line ` | | Removes empty line in an imported file. | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`replace_comma_by_point ` | | Replaces all commas by point in a file (do that inplace). | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`run_dot ` | | calls graphivz on a dot file and produces an image | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+ | :func:`serializedATN ` | | | +-------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------------+