Skip to content

Commit

Permalink
[Enh]: CSV - As *Order Preserving* Dictionaries
Browse files Browse the repository at this point in the history
  • Loading branch information
seandenigris committed Nov 8, 2023
1 parent 0c6ae06 commit 753b70c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/ResourcesLive/RlCSV.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ RlCSV >> asDictionaries [
upToEnd ].
]

{ #category : #accessing }
RlCSV >> asOrderPreservingDictionaries [
"Requires a header, the columns of which will become the dictionary keys"

^ self neoCSVReaderDo: [ :rdr |
rdr
namedColumnsConfiguration;
recordClass: OrderPreservingDictionary;
upToEnd ].
]

{ #category : #accessing }
RlCSV >> dataFrame [
^ #DataFrame asClass readFromCsv: self file
Expand Down

0 comments on commit 753b70c

Please sign in to comment.