File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1954,6 +1954,25 @@ DataFrameTest >> testIncludes [
19541954 self deny: (df includes: dataSeries2)
19551955]
19561956
1957+ { #category : #' find-select' }
1958+ DataFrameTest >> testIncludesAll [
1959+
1960+ | dataSeries1 dataSeries2 |
1961+ dataSeries1 := DataSeries
1962+ withKeys: #( City Population BeenThere )
1963+ values: #( London 8.788 false )
1964+ name: ' C' .
1965+ dataSeries2 := DataSeries
1966+ withKeys: #( City Population BeenThere )
1967+ values: #( Paris 8.788 false )
1968+ name: ' B' .
1969+
1970+ self assert: (df includesAll: { dataSeries1 }).
1971+ self deny: (df includesAll: {
1972+ dataSeries1.
1973+ dataSeries2 })
1974+ ]
1975+
19571976{ #category : #tests }
19581977DataFrameTest >> testIndexOfColumnNamed [
19591978 | expected actual |
Original file line number Diff line number Diff line change @@ -1250,6 +1250,14 @@ DataFrame >> includes: aDataSeries [
12501250 ^ self rows anySatisfy: [ :row | row = aDataSeries ]
12511251]
12521252
1253+ { #category : #' find-select' }
1254+ DataFrame >> includesAll: aDataSeriesCollection [
1255+ " Returns true if the DataFrame includes all of the DataSeries in the specified collection."
1256+
1257+ ^ aDataSeriesCollection allSatisfy: [ :dataSeries |
1258+ self includes: dataSeries ]
1259+ ]
1260+
12531261{ #category : #accessing }
12541262DataFrame >> indexOfColumnNamed: columnName [
12551263 " Answer the index of a column with a given name or signal an exception if the column with that name was not found"
You can’t perform that action at this time.
0 commit comments