Skip to content

Commit c393a8d

Browse files
committed
Added comments for data-type methods in DataFrame and DataSeries classes. Also fixed typo in the transposed method of the DataFrame class.
1 parent 340450c commit c393a8d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/DataFrame/DataFrame.class.st

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,24 +838,28 @@ DataFrame >> crossTabulate: colName1 with: colName2 [
838838

839839
{ #category : #'data-types' }
840840
DataFrame >> dataTypeOfColumn: aColumnName [
841-
841+
"Given a column name of the DataFrame, it returns the data type of that column"
842+
842843
^ dataTypes at: aColumnName
843844
]
844845

845846
{ #category : #'data-types' }
846847
DataFrame >> dataTypeOfColumn: aColumnName put: aDataType [
848+
"Given a column name and a data type, it replaces the original data type of that column with the data type that was given as a parameter"
847849

848850
dataTypes at: aColumnName put: aDataType
849851
]
850852

851853
{ #category : #'data-types' }
852854
DataFrame >> dataTypeOfColumnAt: aNumber [
855+
"Given a column index of the DataFrame, it returns the data type of that column"
853856

854857
^ self dataTypeOfColumn: (columnNames at: aNumber)
855858
]
856859

857860
{ #category : #'data-types' }
858861
DataFrame >> dataTypeOfColumnAt: aNumber put: aDataType [
862+
"Given a column index and a data type, it replaces the original data type of that column with the data type that was given as a parameter"
859863

860864
^ self dataTypeOfColumn: (columnNames at: aNumber) put: aDataType
861865
]
@@ -2050,7 +2054,7 @@ DataFrame >> toColumnsAt: arrayOfColumnNumbers applyElementwise: aBlock [
20502054

20512055
{ #category : #geometry }
20522056
DataFrame >> transposed [
2053-
"Returs a transposed DataFrame. Columns become rows and rows become columns."
2057+
"Returns a transposed DataFrame. Columns become rows and rows become columns."
20542058

20552059
| transposedDf |
20562060
transposedDf := DataFrame withRows: (self asArrayOfColumns).

src/DataFrame/DataSeries.class.st

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ DataSeries >> average [
169169

170170
{ #category : #'data-types' }
171171
DataSeries >> calculateDataType [
172-
172+
"Returns the data type of the data series"
173+
173174
^ self values calculateDataType
174175
]
175176

0 commit comments

Comments
 (0)