File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4927,6 +4927,18 @@ DataFrameTest >> testRowsFromToPut [
49274927 self assert: dataFrame equals: expected
49284928]
49294929
4930+ { #category : #tests }
4931+ DataFrameTest >> testRowsMethod [
4932+
4933+ | expectedCollection |
4934+ expectedCollection := {
4935+ (df rowAt: 1 ).
4936+ (df rowAt: 2 ).
4937+ (df rowAt: 3 ) } asArray.
4938+
4939+ self assert: df rows equals: expectedCollection
4940+ ]
4941+
49304942{ #category : #tests }
49314943DataFrameTest >> testRowsPut [
49324944 | rowNames columnNames dataFrame newRows expected |
Original file line number Diff line number Diff line change @@ -2052,6 +2052,13 @@ DataFrame >> rowNames: anArray [
20522052 self privateRowNames: anArray
20532053]
20542054
2055+ { #category : #accessing }
2056+ DataFrame >> rows [
2057+ " Returns a collection of all rows"
2058+
2059+ ^ (1 to: self numberOfRows) collect: [ :j | self rowAt: j ]
2060+ ]
2061+
20552062{ #category : #accessing }
20562063DataFrame >> rows: anArrayOfNames [
20572064 " Returns a collection of rows whose row names are present in the array anArrayOfNames"
You can’t perform that action at this time.
0 commit comments