I have a Pandas Dataframe where each column is Series of strings. The strings represent the path to files that might be or not be physically present on the hard drive. I would like to mark the path pointing to not existent files, i.e. by coloring the string or its background.
Unfortunately I can't use Styler.applymap(func) because func should take a scalar input, not a string.
Also I just got that anyway Styler wouldn't really work for me because I use the Pycharm python console or the terminal on Ubuntu, not Jupyter
What can I do?
Example function for checking the existence of a file and returning a color
def color_not_existent_file(path):
color = ('red' if not os.path.exists(path) else 'green')
return 'color: {}'.format(color)