-
Notifications
You must be signed in to change notification settings - Fork 930
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
[BUG] to_json ignores index=True #11317
Comments
…SV output, due to a known issue in cudf & pandas (rapidsai/cudf#11317 & pandas-dev/pandas#37600) this option has no effect on JSON output
* instructions for manually testing of Morpheus using Kafka. Adds a Kafka version for each of the four validation scripts in `scripts/validation` * csv & json serializers now support an `include_index_col` flag to control exporting the Dataframe's index column. Note due to a limitation of cudf & pandas this has no impact on JSON: + pandas-dev/pandas#37600 + rapidsai/cudf#11317 * `morpheus.utils.logging` renamed to `morpheus.utils.logger` so that other modules in `morpheus.utils` can import the standard lib logging module. * Comparison logic in the `ValidationStage` has been moved to it's own module `morpheus.utils.compare_df` so that the functionality can be used outside of the stage. fixes #265 Authors: - David Gardner (https://github.com/dagardner-nv) Approvers: - Pete MacKinnon (https://github.com/pdmack) - Michael Demoret (https://github.com/mdemoret-nv) URL: #290
This issue has been labeled |
Thank you for raising this issue. Seems like this could be related to other changes in #11780 |
This is expected behavior in pandas However if you really need index data in json, you will need to pass Both these example have been snapshotted from the to_json docs page Hence closing this issue on cudf side as there is no action item. |
Describe the bug
Documentation for the
index
argument forcudf.DataFrame.to_json
https://docs.rapids.ai/api/cudf/stable/api_docs/api/cudf.DataFrame.to_json.htmlstates:
However this is ignored, and appears to be caused by Pandas as cudf's to_json uses Panda's to_json.
pandas-dev/pandas#37600
Steps/Code to reproduce bug
Issue can be reproduced in both cudf and pandas.
cudf repro:
Yields this output:
Pandas repro:
Expected behavior
Include index column when
index=True
Environment overview (please complete the following information)
The text was updated successfully, but these errors were encountered: