File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1740,44 +1740,3 @@ DataFrameTest >> testWithIndexSelect [
17401740
17411741 self assert: actual equals: expected.
17421742]
1743-
1744- { #category : #tests }
1745- DataFrameTest >> testWithRowNameDo [
1746-
1747- | actual expected |
1748-
1749- expected := Dictionary new .
1750- expected at: #A put: #(Barcelona 1.609 true) asDataSeries.
1751- expected at: #B put: #(Dubai 2.789 true) asDataSeries.
1752- expected at: #C put: #(London 8.788 false) asDataSeries.
1753-
1754- expected keysAndValuesDo: [ :name :each |
1755- each keys: #(City Population BeenThere) .
1756- each name: name ].
1757-
1758- actual := Dictionary new .
1759-
1760- df withRowNameDo: [ :each :key |
1761- actual at: key put: each ].
1762-
1763- self assert: actual equals: expected.
1764- ]
1765-
1766- { #category : #tests }
1767- DataFrameTest >> testWithRowNameDoCanModifyRows [
1768- | expected |
1769-
1770- expected := DataFrame
1771- withRows: #(
1772- (Barcelona 1.609 true)
1773- (DUBAI 2.789 true )
1774- (LONDON 8.788 false ))
1775- rowNames: df rowNames
1776- columnNames: df columnNames.
1777-
1778- df withRowNameDo: [ :row :key |
1779- row name = ' A'
1780- ifFalse: [ row at: #City put: (row at: #City ) asUppercase ] ].
1781-
1782- self assert: df equals: expected.
1783- ]
Original file line number Diff line number Diff line change @@ -1229,18 +1229,3 @@ DataFrame >> withIndexSelect: elementAndIndexBlock [
12291229
12301230 ^ df
12311231]
1232-
1233- { #category : #enumerating }
1234- DataFrame >> withRowNameDo: elementAndKeyBlock [
1235-
1236- 1 to: self size do: [ :i |
1237- | row |
1238- row := (self rowAt: i).
1239-
1240- elementAndKeyBlock
1241- value: row
1242- value: (rowNames at: i).
1243-
1244- " A hack to allow modification of rows inside do block"
1245- self rowAt: i put: row asArray ].
1246- ]
You can’t perform that action at this time.
0 commit comments