-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: Implement to_json() for Panel #5428
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
Comments
go for it! to_excel does the same thing, so fine to just iterate over dataframes. I might put it into the json as an array of DataFrames. The tricky part is converting from json to panel...might need to add a keyword argument to use a slower path for panel for now...the json code can be complicated. |
@mtrbean you get anywhere with this. I'm aiming to work on it over the next few weeks / months. |
@Komnomnomnom Sorry no - I did not manage to get enough understanding of the json lib to implement this and I didn't want to construct a json string manually for panel. If you are going to work on this issue please feel free :) |
Is this issue still open? The functionality is described in docs. If it is still pending then at least it should be clearly documented as not implemented. http://pandas.pydata.org/pandas-docs/dev/generated/pandas.Panel.to_json.html#pandas.Panel.to_json I am checking with 0.16.1 and get raise NotImplementedError("'obj' should be a Series or a DataFrame") |
well, the issue is still marked as open, and the errors message is pretty clear. |
closing as Panels are deprecated |
related #4889
Currently the to_json() method only works for Series and DataFrame, and raises NotImplementedError when called on Panel. Would be great to implement it for Panel as well.
For me it is sufficient to loop through all items and convert each item (DataFrame) to json separately and then stitch them together.
Happy to contribute code if needed.
The text was updated successfully, but these errors were encountered: