Work around a bug in pandas.DataFrame.replace to set the color
Work around a bug in pandas.DataFrame.replace to set the color

In the case a original value (e.g. 0-9A-F) was part of a color
defintion, using df.replace{dict} would do a double replace on the
same cell, resulting in colors like "#12345#ABCDEF", which would
then throw an error during plotting.

Using apply(lambda x: replacements[x]) is probably slower, so should
be replaced when the pandas bug is gone.

See https://github.com/pydata/pandas/issues/5338 for the bugreport
in pandas.

has2k1/plotnine,has2k1/plotnine