File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1973,6 +1973,25 @@ DataFrameTest >> testIncludesAll [
19731973 dataSeries2 })
19741974]
19751975
1976+ { #category : #' find-select' }
1977+ DataFrameTest >> testIncludesAny [
1978+
1979+ | dataSeries1 dataSeries2 |
1980+ dataSeries1 := DataSeries
1981+ withKeys: #( City Population BeenThere )
1982+ values: #( London 8.788 false )
1983+ name: ' C' .
1984+ dataSeries2 := DataSeries
1985+ withKeys: #( City Population BeenThere )
1986+ values: #( Paris 8.788 false )
1987+ name: ' B' .
1988+
1989+ self assert: (df includesAny: {
1990+ dataSeries1.
1991+ dataSeries2 }).
1992+ self deny: (df includesAny: { dataSeries2 })
1993+ ]
1994+
19761995{ #category : #tests }
19771996DataFrameTest >> testIndexOfColumnNamed [
19781997 | expected actual |
Original file line number Diff line number Diff line change @@ -1258,6 +1258,14 @@ DataFrame >> includesAll: aDataSeriesCollection [
12581258 self includes: dataSeries ]
12591259]
12601260
1261+ { #category : #' find-select' }
1262+ DataFrame >> includesAny: aDataSeriesCollection [
1263+ " Returns true if the DataFrame includes any of the DataSeries in the specified collection."
1264+
1265+ ^ aDataSeriesCollection anySatisfy: [ :dataSeries |
1266+ self includes: dataSeries ]
1267+ ]
1268+
12611269{ #category : #accessing }
12621270DataFrame >> indexOfColumnNamed: columnName [
12631271 " 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