changed nan check to a str comparison as isnan an is np.nan aren't alway suitable. Added ability to overwrite the fill char if nan