added in-memory conversion to hdf5 file; allowed kwargs for excel conversion
This commit is contained in:
@ -19,9 +19,15 @@ class DateFrameHolder:
|
|||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
|
|
||||||
def to_excel_binary(df):
|
def to_excel_binary(df, **kwargs):
|
||||||
with BytesIO() as out:
|
with BytesIO() as out:
|
||||||
df.to_excel(out)
|
df.to_excel(out, **kwargs)
|
||||||
|
res = out.getvalue()
|
||||||
|
return res
|
||||||
|
|
||||||
|
def to_hdf_binary(df, key="df", **kwargs):
|
||||||
|
with BytesIO() as out:
|
||||||
|
df.to_hdf(out, key, **kwargs)
|
||||||
res = out.getvalue()
|
res = out.getvalue()
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user