zero323 commented on a change in pull request #35296:
URL: https://github.com/apache/spark/pull/35296#discussion_r790685881
##########
File path: python/pyspark/pandas/generic.py
##########
@@ -904,6 +904,8 @@ def to_json(
.. note:: output JSON format is different from pandas'. It always use
`orient='records'`
for its output. This behaviour might have to change in the near
future.
+
+ .. note:: If column have only NaN or Null values. The column well be
deleted.
Review comment:
So if I understand your correctly, it means either adding a keyword only
argument
```python
def to_json(
self,
...,
*,
ignoreNullFields: bool = False,
**options: Any,
) -> Optional[str]:
...
options["ignoreNullFields"] = ignoreNullFields
```
or patching the `options`
```python
def to_json(
self,
...,
**options: Any,
) -> Optional[str]:
...
if "ignoreNullFields" not in options:
options["ignoreNullFields"] = False
```
to ensure that output is consistent independent of `path`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]