Skip to content

Commit

Permalink
remove py2.7 feature
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-wang committed May 12, 2015
1 parent 4a148f7 commit 672efba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/pyspark/sql/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ def replace(self, to_replace, value, subset=None):
raise ValueError("to_replace and value lists should be of the same length")
rep_dict = dict(zip(to_replace, value))
elif isinstance(to_replace, list) and isinstance(value, (float, int, long, basestring)):
rep_dict = {tr: value for tr in to_replace}
rep_dict = dict([(tr, value) for tr in to_replace])
elif isinstance(to_replace, dict):
rep_dict = to_replace

Expand Down

0 comments on commit 672efba

Please sign in to comment.