pydong package
Submodules
pydong.cli module
Console script for pydong.
pydong.pydong module
Main module.
pydong.utils module
common file
- pydong.utils.format_df(df, int_format='{:,}', float_format='{:,4f}')[source]
Formats the columns of pandas.DataFrame with the type of int and float
Parameters
- dfpandas.DataFrame
the df to revise
- int_format: str, optional
the format of int columns, refer to the python f-string
- float_format: str, optional
the format of float columns, refer to the python f-string
Returns
pandas.DataFrame
- pydong.utils.log(file_name=None, logger_name='pydong.utils', quite=False)[source]
logging template
Parameters
- file_namestr, default None
if set, will generate log file.
- logger_namestr, default __name__
logger name
- quitebool, default False
if True, set log level to ERROR else INFO
Returns
logger
- pydong.utils.safe_open(file_name, mode='r')[source]
open the file safely
Parameters
- file_namestr
the name of file path
- modestr, optional
the opem mode, by default ‘r’
Returns
file_handle
Module contents
Top-level package for pydong.