rocketlaunchr / dataframe-go

DataFrames for Go: For statistics, machine-learning, and data manipulation/exploration
Other
1.19k stars 95 forks source link

MergeColumns and TimeFormat options for importing csv #35

Closed zdevwu closed 4 years ago

zdevwu commented 4 years ago

Added the ability to merge columns and customise the time format when parsing time values

pjebs commented 4 years ago

Can you explain what it does and provide an example

zdevwu commented 4 years ago

@pjebs the code comment and tests should explain

zdevwu commented 4 years ago

these two features combine to achieve the parse_dates options in pandas read_csv https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html

pjebs commented 4 years ago

Thank you for your contribution.

The ability to parse custom date formats are already implemented. Your current implementation only allows 1 custom format when different columns may have different date formats.

Currently it is possible using: https://godoc.org/github.com/rocketlaunchr/dataframe-go/imports#Converter

With regards to the "merging", it can done using Apply using InPlace: true: https://godoc.org/github.com/rocketlaunchr/dataframe-go#Apply and then deleting one of the series.