Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn data.frames with a JSON column into a tbl_json object #27

Closed
jeremystan opened this issue Apr 2, 2015 · 0 comments · Fixed by #28
Closed

Turn data.frames with a JSON column into a tbl_json object #27

jeremystan opened this issue Apr 2, 2015 · 0 comments · Fixed by #28

Comments

@jeremystan
Copy link

From David, a data scientist at socure.me:

"My question is whether it can be used on a data frame with a number of regular columns and one json column. Ideally, I'd like to expand just the json column into its constituent columns, and then bind them back with the rest of the dataframe. Is this possible?"

One way to implement this would be through a as.tbl_json.data.frame function that takes a mandatory second argument which identifies the column of the source data.frame that contains the JSON data.

This is useful for:

  • JSON that was added to an existing data.frame (perhaps via multiple API calls)
  • Tables exported from relational databases that have JSON columns (e.g., Postgres)

This should also support dplyr::data_frame and dplyr::tbl.df source objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant