rotifer.pandas.functions.to_color#
- rotifer.pandas.functions.to_color(data, colors='/home/runner/work/rotifer/rotifer/share/rotifer/colors/aminoacids.yml', style='fg', padding=None, fillchar=' ')[source]#
Convert a DataFrame or Series to DType str and add ASCII color codes to each character.
- Parameters:
- colors: str, os.PathLike or dict, default None
A YAML file or a dictionary, mapping characters to color codes.
- style: str, default ‘fg’
Whether apply colors to the background (‘bg’) or toi characters (‘fg’).
- padding: {‘left’, ‘right’, ‘both’}, default None
If set, data will be padded with whitespaces to make sure all columns have the same length.
- fillchar: str, default ‘ ‘
Additional character for filling, default is whitespace.