Skip to content

Commit

Permalink
use _bin_op in dataframe.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-fan committed May 8, 2015
1 parent 6bf72bc commit 2a70526
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/pyspark/sql/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ def __init__(self, jc):

# container operators
__contains__ = _bin_op("contains")
__getitem__ = getItem
__getitem__ = _bin_op("getItem")

# bitwise operators
bitwiseOR = _bin_op("bitwiseOR")
Expand All @@ -1300,7 +1300,7 @@ def getItem(self, key):
| 1| value|
+----+------+
"""
return Column(self._jc.getItem(key))
return self[key]

def getField(self, name):
"""An expression that gets a field by name in a StructField.
Expand All @@ -1320,7 +1320,7 @@ def getField(self, name):
| 1|
+---+
"""
return Column(self._jc.getField(name))
return self[name]

def __getattr__(self, item):
if item.startswith("__"):
Expand Down

0 comments on commit 2a70526

Please sign in to comment.