snowflake.snowpark.Row¶ class snowflake.snowpark.Row(*values: Any, **named_values: Any)[source]¶ Bases: tuple Represents a row in DataFrame. It is immutable and works like a tuple or a named tuple. CopyExpand>>> row = Row(1, 2) >>> row Row(1, 2) >>> row[0] 1 >>> len(row) 2 >>> row[0:1] Row(1) >>> named_row = Row(name1=1, name2=2) >>> named_row Row(name1=1, name2=2) >>> named_row["name1"] 1 >>> named_row.name1 1 >>> row == named_row True Show lessSee moreScroll to top A Row object is callable. You can use it to create other Row objects: CopyExpand>>> Employee = Row("name", "salary") >>> emp1 = Employee("John", 10000) >>> emp1 Row(name='John', salary=10000) >>> emp2 = Employee("James", 20000) >>> emp2 Row(name='James', salary=20000) Show lessSee moreScroll to top Methods asDict([recursive]) Convert to a dict if this row object has both keys and values. as_dict([recursive]) Convert to a dict if this row object has both keys and values. See moreShow lessExpand