Skip to content

Commit

Permalink
Merge pull request #282 from svenvc/master
Browse files Browse the repository at this point in the history
Add DataFrame>>#summary
  • Loading branch information
jecisc authored Dec 11, 2023
2 parents b0b0ed7 + f1127d7 commit f085adf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/DataFrame/DataFrame.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2537,6 +2537,19 @@ DataFrame >> stdev [
^ self applyToAllColumns: #stdev
]

{ #category : #statistics }
DataFrame >> summary [
| summaryFrame |
summaryFrame := nil.
self columnNames do: [ :column |
((self dataTypeOfColumn: column) inheritsFrom: Number)
ifTrue: [
summaryFrame
ifNil: [ summaryFrame := (self column: column) summary asDataFrame ]
ifNotNil: [ summaryFrame addColumn: (self column: column) summary ] ] ].
^ summaryFrame
]

{ #category : #accessing }
DataFrame >> tail [
"Returns the last 5 rows of a DataFrame"
Expand Down

0 comments on commit f085adf

Please sign in to comment.