fix: replace newline with whitespace to fix display in plot embeddings#963
fix: replace newline with whitespace to fix display in plot embeddings#963
Conversation
Signed-off-by: anna-charlotte <[email protected]>
Codecov ReportBase: 85.20% // Head: 85.20% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #963 +/- ##
=======================================
Coverage 85.20% 85.20%
=======================================
Files 155 155
Lines 8050 8051 +1
=======================================
+ Hits 6859 6860 +1
Misses 1191 1191
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
JohannesMessner
left a comment
There was a problem hiding this comment.
LGTM, love to see PR descriptions like this one! 👍
docarray/array/mixins/io/csv.py
Outdated
| t = pd.pop('tags') | ||
| pd.update({f'tag__{k}': v for k, v in t.items()}) | ||
|
|
||
| pd = {k: str(v).replace('\n', ' ') for k, v in pd.items()} |
There was a problem hiding this comment.
lets rename this to something else than pd since this is usually use for pandas
There was a problem hiding this comment.
What I don't understand is why the parser don't just do a return to the line by itself ? Is it because it does not handle it ?
|
have we checked if this is a documented feature/behavior of the dependency we use to plot embeddings? if not, we could in parallel open an issue to them to see if we can remove the hack in the future |
Ok, I will check |
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte [email protected]
If a Documents fields contain '\n' this messes up the display in
.plot_embeddings().Therefore we want to replace all '\n' with whitespaces for display.
E.g. for the following Document:
The information of that Document looks like this:

But should look like this:

.plot_embeddings()