Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadCSV ¶
func ReadCSV(options CsvOptions) (*dataframes.DataFrame, error)
ReadCSV reads a csv file using the given option arguments. Returns the created dataframe with an error, if any.
Refer the CsvOptions struct to get more information on read arguments.
Types ¶
type CsvOptions ¶
type CsvOptions struct { // Any valid string path is acceptable Path string // Delimiter to use. Default will be a ','. Must be a valid rune and must not be \r, \n Delimiter rune // Column to use as the index of the DataFrame. Default index will be used if unspecified IndexCol string // A list of columns, which should be casted as dates DateCols []string // The default date format to be used. This field is mandatory if the date cols field is specified DateFormat string // A map of date columns and their respected formats. This is useful if multiple date columns exists // with different formats. // // Format can be specified as the map key and list of column names can be given as map values. // // If both DateCols and ParseDates fields are present, DateCols field will be disregarded. ParseDates map[string][]string // If an encountered when parsing lines (e.g. a csv line with too many commas) will by default return an error // and no DataFrame will be returned. If true, then these “bad lines” will dropped from the DataFrame that is // returned. SkipErrorLines bool // WarnErrorLines prints a warning for each “error line” to the standard output. Default is set to false. WarnErrorLines bool }
CsvOptions describes the read options specific to only csv format
Click to show internal directories.
Click to hide internal directories.