Skip to content

Commit

Permalink
don't replace spaces with periods in data frame conversion (#61)
Browse files Browse the repository at this point in the history
* don't replace spaces with periods in data frame conversion

* comment
  • Loading branch information
shouples authored Oct 25, 2023
1 parent 575997e commit 73cd1ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion r/noteable/.Rprofile
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ 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)
# 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(
schema = schema,
Expand Down

0 comments on commit 73cd1ce

Please sign in to comment.