if one tries to import an excel file using mlem.api.importobject() function and sets type as "pandas[excel]" MLEM sets the format incorrectly to csv and also if the copy_data is set to True it will write the data in csv format instead of excel.
I have tracked down the issue and the problem lies in two classes "DataFrameType" and "SeriesType" in contrib.pandas package
in _getwriter() method of these two classes it compares the extension of the file which is in this case either "xlsx" or "xls" with the list of extensions in _PANDASFORMATS and _PANDAS_SERIESFORMATS and since it does not match with "excel" it defaults to the csv which is the default format.
One solution would be to add an extra elif such as
if ext in PANDAS_SERIES_FORMATS:
fmt = ext
elif ext in ["xls", "xlsx"]:
fmt = "excel"
if one tries to import an excel file using mlem.api.importobject() function and sets type as "pandas[excel]" MLEM sets the format incorrectly to csv and also if the copy_data is set to True it will write the data in csv format instead of excel. I have tracked down the issue and the problem lies in two classes "DataFrameType" and "SeriesType" in contrib.pandas package in _getwriter() method of these two classes it compares the extension of the file which is in this case either "xlsx" or "xls" with the list of extensions in _PANDASFORMATS and _PANDAS_SERIESFORMATS and since it does not match with "excel" it defaults to the csv which is the default format. One solution would be to add an extra elif such as