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
I kind of think that if you just attempted to read the file first and then gave that to CSV.parse then I could use ruby's StringIO in place of a path since it would be read outside of the CSV lib.
Thank you!
The text was updated successfully, but these errors were encountered:
@reedjosh - Thanks a lot for suggesting this feature! 🎉
We currently have a read_csv method that reads from a csv file. If you want to have a similar from_csv method that imports from a CSV String / StringIO, it'd involve a very minor code change in the daru-io repository
Specifically in this file, you can add a from method that looks like this:
deffrom(file_data)@file_data=file_dataselfend
and expose a from_csv method liek this in the same file:
Daru::DataFrame.register_io_module:from_csv,self
Would you be willing to contribute this feature, @reedjosh?
Feature Request
I get csv output from a command. I would like a way to give
Daru.from_csv
a csv string for parsing instead of a path.In Pandas I do:
I don't know if StringIO is do-able for
Daru.from_csv
, but I'm working around it now via:I kind of think that if you just attempted to read the file first and then gave that to CSV.parse then I could use ruby's StringIO in place of a path since it would be read outside of the CSV lib.
Thank you!
The text was updated successfully, but these errors were encountered: