From 53b46aa2db7684aaa2fed18c1a2734bb51b47182 Mon Sep 17 00:00:00 2001 From: Dave Shoup Date: Wed, 25 Oct 2023 18:14:07 -0400 Subject: [PATCH 1/2] don't replace spaces with periods in data frame conversion --- r/noteable/.Rprofile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/noteable/.Rprofile b/r/noteable/.Rprofile index d55b1766..9c91b67f 100644 --- a/r/noteable/.Rprofile +++ b/r/noteable/.Rprofile @@ -32,7 +32,7 @@ prepare_dex_content <- function(df) { # vectorized format (list of lists) #data = as.matrix.data.frame(t(df)) # pandas df.to_dict("records") format - data = as.data.frame.list(df) + data = as.data.frame.list(df, check.names=FALSE) list( schema = schema, From d84c46e2331f9afb3bf15b0fd9ee52894a8f9c72 Mon Sep 17 00:00:00 2001 From: Dave Shoup Date: Wed, 25 Oct 2023 18:18:31 -0400 Subject: [PATCH 2/2] comment --- r/noteable/.Rprofile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/r/noteable/.Rprofile b/r/noteable/.Rprofile index 9c91b67f..60123a49 100644 --- a/r/noteable/.Rprofile +++ b/r/noteable/.Rprofile @@ -31,7 +31,10 @@ prepare_dex_content <- function(df) { # vectorized format (list of lists) #data = as.matrix.data.frame(t(df)) + # pandas df.to_dict("records") format + # NOTE: if we don't pass check.names=FALSE, columns with spaces will show periods instead, which will + # break the connection between the fields defined in `schema` and the keys in `data` data = as.data.frame.list(df, check.names=FALSE) list(