-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PDEP-12: compact-and-reversible-JSON-interface.md #53714
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
Conversation
I'm not sure the PDEP number is correct. If not, can you send me the correct number ? |
thanks for opening this - I haven't taken a look at the content yet, but the next number in line would be 12 |
PDEP number is now 12 |
I think this does not meet the bar of being a commonly used format for implementation within pandas. I would support a third party package that reads/writes this format to/from pandas DataFrames being listed in the ecosystem. |
Thanks Richard for your advice. And regarding the main feature: having a reversible JSON interface, do you think it will be important (or strategic) for pandas to have this interface? |
The table interface already exists for JSON interchange. This PDEP proposes an alternative format w/o even mentioning the existing or commenting on any defects. |
Thanks Jeff, if your remark concerns the option If you think the list provided is not sufficient, I can complete it. |
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
Not read all of this, but the fact that the table interface is buggy is not a reason to add a new interface. I'd rather fix those bugs. |
Thank you Patrick for this remark which is quite relevant (see other similar remarks in the thread). In addition to the answers given (and indicated in the FAQ), I specify that it is mainly a functional problem: Today, the Thus, if the objective is to implement an interface that respects the Table-schema specification, it will be necessary to implement a solution similar to the one proposed (this has moreover been partially achieved with the notion of |
I finally had a chance to read this, and I agree with @rhshadrach . Having a third party package that uses this format seems to be in the best interest of pandas at this time.
If that format does get adopted as a standard, then we can consider including this within pandas. We've also had discussions about creating an interface to allow various file formats to be externalized. If we end up doing that, then that would be an easier way of supporting this format versus putting the burden on the pandas team to maintain any interface. Based on our currently proposed procedures for handling PDEP's, we're past the 60 day discussion period, but because we didn't make it very visible, I'll ping @pandas-dev/pandas-core here in case there are additional comments, and call for a vote on September 11. |
Thanks @Dr-Irv for your answer. Indeed, during this two-month period, I was surprised not to have any comments on the difficulties and expectations around the JSON interface as well as on the contributions of the proposal. Perhaps this interface remains secondary. In relation to the work done, it seems to me that several actions could be taken: 1. carry out an inventory of the JSON interface: There are inconsistencies and shortcomings that should be identified (first work done in the Notebook)
3. have feedback on the proposed solution (which meets the guidelines proposed above): the proposal to integrate the proposed solution into the ecosystem can meet this need Of course, I can help on these points if necessary. |
sorry I missed this. I am a big fan of the JSON interface and use it with all my web microservices. Pandas is not great with JSON as you have highlighted and I think generally working towards its improvement is a good thing. In my use cases I have monkey patched some things to suit my dtypes. Also other web developers have commented that a better Styler.to_json output would be useful to translate the conditional attribute-value pairs into JSON for interface with Javascript developed components, which I have also monkey patched at times. I included this comment in my own PDEP (4?) but have unfortunately not had the time to follow it up |
Partially my fault for not reading what you had put together and subsequently alerting the core team. Apologies for that.
One thing that you could consider is to be incremental in modifying the existing JSON interface, i.e., create PR's that make small incremental improvements to the existing interface rather than bring forth an entirely new format. There are currently 38 open issues in pandas with |
In fact, my intention in this remark was to clarify that the answers obtained were only about the "how" but not the "what" nor the "why", which surprised me (it was not about your support for this action) .
I understand that the priority of the project is to address existing issues rather than adding new features that might add new issues!
It therefore seems to me that it is also a priority to make an inventory of the Json interface to highlight the priorities. That said, I also agree with the remark and I will first understand these 38 issues and share a summary of them (but I am not sure that I am the right profile to correct them). |
It seems to me that you should consider withdrawing this PDEP, and you can create a new meta-issue in pandas that summarizes the inventory you create, pointing to each of the relevant issues, and then that allows you or others to work on different aspects. However, you could keep the PDEP open, and I'll call for a vote on September 11, although my sense is that it is unlikely to get accepted. |
I don't understand why I should consider withdrawing this PDEP:
For the meta-issue, I agree with the proposal to integrate the analysis of the issues in addition to the analysis already carried out (shared via the Notebook) concerning the questions of type conservation and reversibility (roundtrip). I will try to provide it before September 11th.
I prefer this second solution which will allow explicit feedback on the proposal (with the uncertainties mentioned) |
Several comments remind us that the Table Schema interface already exists for JSON interchange. The principles of Table Schema are also consistent with those addressed in this proposal (notion of type). I therefore took into account in the proposal an extension of the Table Schema interface (addition of types defined by Table Schema and not yet implemented in orient="table" - issue #55038). Furthermore, the analysis of the 71 JSON issues shows that the proposal resolves or provides an alternative solution for the following issues: #12997, #14358, #16492, #35420, #35464, #36211, #39537, #49585, #50782, #51375, #52595, #53252 |
Thank you @attack68 for your support !
I don't use Styler but I see in the documentation that Styler.to_json no longer exists?? |
This PDEP has failed to gain enough support. See #55095 (comment) @loco-philippe Can you update the status as rejected, and then push, so we keep it in the archives? |
I followed and took the vote into account. My conclusion, after reflections on this PDEP, is the following:
So I will update the PDEP to add the conclusions and the result of the vote to close this PR (this weekend). As indicated in the latest version of the PDEP, I have integrated the Table Schema Interface into the JSON-NTV library, so this module is now compatible with all of the data types defined in the Table Schema specification. Thank you again Irv for your involvement in this PDEP ! |
PDEP is updated with rejected status and vote results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @loco-philippe for your patience while we went through this process. We had a healthy discussion.
This new PDEP is proposed on the advise of Dr-Irv