Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve print formatting of strings containing newline characters. (N…
…VIDIA#11108) String data that contained \r and \n characters would print badly mangled. Example column containing: ``` .,e,Infinity,+Infinity,-Infinity,+nAn,-naN,Nan,5f,1.2f,\riNf,NULL ``` Doing a `cudf::test::print()` on this would yield mostly garbage, but importantly, plausible-seeming but puzzling garbage: ``` iNf,NULLnity,+Infinity,-Infinity,+nAn,-naN,Nan,5f,1.2f, ``` The fix is to do a little postprocessing and replace the individual chars `'\r'` and `'\n'` with the escaped strings `"\r"` and `"\n"`. Note that this only applies to the output ultimately sent to the print - not to the raw data retrieved from the device itself using `::to_host` Authors: - https://github.com/nvdbaranec Approvers: - David Wendt (https://github.com/davidwendt) - Mike Wilson (https://github.com/hyperbolic2346) - Bradley Dice (https://github.com/bdice) - Karthikeyan (https://github.com/karthikeyann) URL: rapidsai/cudf#11108
- Loading branch information