tools.helpers package¶
Subpackages¶
- tools.helpers.advanced_utils package
- tools.helpers.config_manager package
- tools.helpers.data_manager package
- tools.helpers.interface package
- Submodules
- tools.helpers.interface.advanced_wrappers module
- tools.helpers.interface.anomalies module
- tools.helpers.interface.basics module
- tools.helpers.interface.custom_dialog module
- tools.helpers.interface.custom_messagebox module
- tools.helpers.interface.date_picker module
- tools.helpers.interface.logger_widget module
- tools.helpers.interface.main_interface module
- tools.helpers.interface.text_frame module
- tools.helpers.interface.tooltip module
- tools.helpers.interface.wrappers module
- Module contents
- tools.helpers.models package
- tools.helpers.utils package
Module contents¶
Helpers.
-
tools.helpers.
isiterable
(obj)¶ Returns whether an object is “iterable” or not. Are considered iterable tuple, list, set and inherited classes
-
tools.helpers.
isinstance_filetypes
(filetypes)¶ Returns True if ‘filetypes’ is a valid variable for filetypes argument in tkinter.filedialog functions, else False.
-
tools.helpers.
isinlist
(obj, iterable)¶ Returns whether an object is in the iterable or not.
Support is granted for numpy and pandas objects which have multiple definitions of truth. One numpy/pandas object is considered in the iterable if the object itself is in the iterable. Therefore, if a copy but not the object is present in the iterable, isinlist returns False.
>>> df = pd.DataFrame() >>> ls = [5, 'a', np.array([5, 4]), df] >>> isinlist(5, ls), isinlist(6, ls), isinlist('a', ls), isinlist('b', ls) (True, False, True, False) >>> isinlist(df, ls), isinlist(df.copy(), ls), isinlist(np.array([5, 4]), ls) (True, False, False)