Github user ScrapCodes commented on a diff in the pull request:
https://github.com/apache/spark/pull/13839#discussion_r68479735
--- Diff: python/pyspark/sql/dataframe.py ---
@@ -282,8 +284,18 @@ def show(self, n=20, truncate=True):
| 2|Alice|
| 5| Bob|
+---+-----+
- """
- print(self._jdf.showString(n, truncate))
+ >>> df.show(truncate=3)
+ +---+----+
+ |age|name|
+ +---+----+
+ | 2| Ali|
+ | 5| Bob|
+ +---+----+
+ """
+ if truncate == 1:
--- End diff --
Yes, I did it because, in python 1 and True are indistinguishable.
```python
Type "help", "copyright", "credits" or "license" for more information.
>>> a=True
>>> isinstance(a, bool)
True
>>> isinstance(a, int)
True
>>> a == 1
True
>>> a == True
True
>>>
```
In both python 2 and 3.
But,
```python
>>> a=1
>>> isinstance(a, bool)
False
```
Might help here. I can go ahead and change it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]