Skip to content

Commit 18677f2

Browse files
committed
Added comments
1 parent 1b77033 commit 18677f2

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/DataFrame/DataFrame.class.st

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,8 @@ DataFrame >> columnsFrom: firstNumber to: secondNumber put: anArrayOfArrays [
783783

784784
{ #category : #accessing }
785785
DataFrame >> contents [
786-
786+
"Returns all the values of the DataFrame"
787+
787788
^ contents
788789
]
789790

@@ -970,11 +971,14 @@ DataFrame >> getJointColumnsWith: aDataFrame [
970971

971972
{ #category : #grouping }
972973
DataFrame >> group: anAggregateColumnName by: aGroupColumnName aggregateUsing: aBlock [
974+
"Group the values of the cloumn named anAggregateColumnName by the unique values of the column named aGroupColumnName, aggregate them using aBlock. With the same name as anAggregateColumnName"
975+
973976
^ self group: anAggregateColumnName by: aGroupColumnName aggregateUsing: aBlock as: anAggregateColumnName
974977
]
975978

976979
{ #category : #grouping }
977980
DataFrame >> group: anAggregateColumnName by: aGroupColumnName aggregateUsing: aBlock as: aNewColumnName [
981+
"Group the values of the cloumn named anAggregateColumnName by the unique values of the column named aGroupColumnName, aggregate them using aBlock. With a new column name aNewColumnName"
978982

979983
| groupColumn aggregateColumn |
980984

src/DataFrame/DataSeries.class.st

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,11 +697,15 @@ DataSeries >> sortDescending [
697697

698698
{ #category : #sorting }
699699
DataSeries >> sorted [
700+
"Returns a sorted copy of the data series without rearranging the original data series"
701+
700702
^ self sorted: [ :a :b | a <= b ]
701703
]
702704

703705
{ #category : #sorting }
704706
DataSeries >> sorted: aBlock [
707+
"Returns a copy of the data series after applying aBlock without rearranging the original data series"
708+
705709
| associationBlock |
706710
associationBlock := [ :a :b | aBlock value: a value value: b value ].
707711
^ self sortedAssociations: associationBlock
@@ -716,6 +720,8 @@ DataSeries >> sortedAssociations: aBlock [
716720

717721
{ #category : #sorting }
718722
DataSeries >> sortedDescending [
723+
"Returns a sorted copy of the data series in descending order without rearranging the original data series"
724+
719725
^ self sorted: [ :a :b | a > b ]
720726
]
721727

@@ -942,7 +948,8 @@ DataSeries >> withSeries: otherDataSeries collect: twoArgBlock [
942948

943949
{ #category : #private }
944950
DataSeries >> withoutNils [
945-
951+
"Returns a data series without the elements whose values were nil values"
952+
946953
^ self reject: #isNil
947954
]
948955

0 commit comments

Comments
 (0)