SDMetrics icon indicating copy to clipboard operation
SDMetrics copied to clipboard

Fix representation of categorical data types in NewRowSynthesis metric

Open MaanasArora opened this issue 2 years ago • 0 comments

Resolves #397.

Reviewing the history of the file, it seems that the condition of checking for the O (object) data type was created to hard-code single quotes around the value instead of using repr:

https://github.com/sdv-dev/SDMetrics/blob/585290fc829db32645c1231d5b0385b9e90a0a4c/sdmetrics/single_table/new_row_synthesis.py#L120-L123

But now that we have it, I propose we can remove the else condition as repr would handle our edge cases (such as formatting strings with quotes and integers with none).

Let me know if this works. Thank you very much!

MaanasArora avatar Sep 28 '23 04:09 MaanasArora