Closed elsander closed 5 years ago
(this is essentially a thin wrapper around civis.io.dataframe_to_file
, but I find it quite useful and I'm guessing other users would as well)
If I understand correctly, this is just a two liner:
df.to_csv(filename)
file_to_civis(filename)
But if you see the need for the function I'd be happy to review.
The most basic version of it is that two-liner, but it's nicer to wrap it in a temporary directory so that you don't end up with a bunch of local junk files. It's still only a few lines, but it's still convenient to have. It's also just nice to have the reverse functionality, since most of civis.io
has functions for both i/o directions, and it's surprising as a user when that's not the case for files <-> pandas.
civis.io
has a functionfile_to_dataframe
, but no function going in the opposite direction. I find myself rewriting this simple function for myself a lot, and I thought it would make a nice little convenience for others. @keithing, would you be interested in including something like this in thecivis.io
function suite (I would make a PR)?