Skip to content

Commit 3907b9a

Browse files
committed
#info should work on numerical column name
1 parent 98a709e commit 3907b9a

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/DataFrame-Tests/DataFrameTest.class.st

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,6 +1761,21 @@ Data columns (total 3 columns):
17611761
'
17621762
]
17631763

1764+
{ #category : #splitjoin }
1765+
DataFrameTest >> testInfoWithNumericalColumnNames [
1766+
1767+
df := DataFrame withRows: #( #( 2.4 true rain ) #( 0.5 true rain ) #( -1.2 true snow ) #( -2.3 false - ) #( 3.2 true rain ) ).
1768+
1769+
self assert: df info equals: 'DataFrame: 5 entries
1770+
Data columns (total 3 columns):
1771+
# | Column | Non-nil count | Dtype
1772+
---------------------------------------------------
1773+
1 | 1 | 5 non-nil | SmallFloat64
1774+
2 | 2 | 5 non-nil | Boolean
1775+
3 | 3 | 5 non-nil | Object
1776+
'
1777+
]
1778+
17641779
{ #category : #tests }
17651780
DataFrameTest >> testInjectInto [
17661781
| numericDataFrame actual expected |

src/DataFrame/DataFrame.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ DataFrame >> info [
10571057
aStream
10581058
print: index;
10591059
nextPutAll: ' | ';
1060-
nextPutAll: col;
1060+
print: col;
10611061
nextPutAll: ' | ';
10621062
print: ((self columnAt: index) reject: #isNil) size;
10631063
nextPutAll: ' non-nil | ';

0 commit comments

Comments
 (0)