Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion python/pyspark/sql/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1367,6 +1367,10 @@ class Row(tuple):
>>> row = Row(name="Alice", age=11)
>>> row
Row(age=11, name='Alice')
>>> row = Row(name="Alice", age=11)
>>> another = row(22, "Hyukjin")
>>> another
Row(age=22, name='Hyukjin')
>>> row['name'], row['age']
('Alice', 11)
>>> row.name, row.age
Expand Down Expand Up @@ -1434,7 +1438,7 @@ def conv(obj):
# let object acts like class
def __call__(self, *args):
"""create new Row object"""
return _create_row(self, args)
return _create_row(self.__fields__, args)

def __getitem__(self, item):
if isinstance(item, (int, slice)):
Expand Down