You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, owing to the restriction due to automatic monkey-patching of daru-io modules into daru, the Importers are designed like this.
#! Usage from darudf=Daru::DataFrame.read_csv(path,col_sep: ' ',other_opts)#! is linked to daru-io likeinst=Daru::IO::Importers::CSV.read(path)df=inst.call(col_sep: ' ',other_opts)
But, daru-io could use better set of arguments for methods, to ensure that a file is read only ONCE, and then called for dataframe with other options.
df=Daru::DataFrame.read_csv(path,col_sep: ' ',other_opts)#! should rather be linked to daru-io likeinst=Daru::IO::Importers::CSV.read(path,col_sep: ' ')df=inst.call(other_opts)
In general, all file parsing arguments and path should be provided in the read method, while post-reading arguments can be provided in call method.
The text was updated successfully, but these errors were encountered:
Suggested by @zverok in PR #52
Currently, owing to the restriction due to automatic monkey-patching of daru-io modules into daru, the Importers are designed like this.
But, daru-io could use better set of arguments for methods, to ensure that a file is read only ONCE, and then called for dataframe with other options.
In general, all file parsing arguments and
path
should be provided in theread
method, while post-reading arguments can be provided incall
method.The text was updated successfully, but these errors were encountered: