@@ -543,7 +543,7 @@ DataFrame >> average [
543543{ #category : #' data-types' }
544544DataFrame >> calculateDataTypes [
545545
546- self columns doWithIndex: [ :column :i | self dataTypes at: (self columnNames at: i) put: column calculateDataType ]
546+ self asArrayOfColumns doWithIndex: [ :column :i | self dataTypes at: (self columnNames at: i) put: column calculateDataType ]
547547]
548548
549549{ #category : #comparing }
@@ -722,10 +722,9 @@ DataFrame >> columnNames: aCollection [
722722
723723{ #category : #accessing }
724724DataFrame >> columns [
725-
726725 " Returns a collection of all columns"
727726
728- ^ self asArrayOfColumns
727+ ^ ( 1 to: self numberOfColumns) collect: [ :j | self columnAt: j ]
729728]
730729
731730{ #category : #accessing }
@@ -1053,7 +1052,7 @@ DataFrame >> hasNils [
10531052 " Returns true if there is atleast one nil value in the data frame. Returns false if there are no nil values in the dataframe"
10541053
10551054 | arrayOfColumns |
1056- arrayOfColumns := self columns .
1055+ arrayOfColumns := self asArrayOfColumns .
10571056 1 to: self numberOfColumns do: [ :column |
10581057 1 to: self numberOfRows do: [ :row |
10591058 ((arrayOfColumns at: column) at: row) ifNil: [ ^ true ] ] ].
@@ -1397,7 +1396,7 @@ DataFrame >> normalized [
13971396 ' DataFrame will remove the dependency over normalization in the next version. You can use pharo-ai/data-preprocessing project to normalize your DataFrame and even more!' .
13981397 normalizers := (1 to: self anyOne size) collect: [ :e | self class defaultNormalizerClass new ].
13991398
1400- normalizedColumns := self columns with: normalizers collect: [ :col :normalizer | col normalizedUsing: normalizer ].
1399+ normalizedColumns := self asArrayOfColumns with: normalizers collect: [ :col :normalizer | col normalizedUsing: normalizer ].
14011400
14021401 ^ self class withColumns: normalizedColumns columnNames: self columnNames
14031402]
0 commit comments