dataframe_image
dataframe_image copied to clipboard
Nothing is exported if filename is pathlib.Path type
When a pathlib.Path object is passed to dfi.export, nothing is saved and no error is raised (although pathlib.Path should be supported)
To replicate:
- The code below will save nothing (no errors, just no output!)
from pathlib import Path
import numpy as np
import pandas as pd
import dataframe_image as dfi
filename = Path('test.png')
pd.DataFrame(np.random.rand(6,4)).dfi.export(filename)
- Adding a str() will make dataframe_image work as per documentation:
pd.DataFrame(np.random.rand(6,4)).dfi.export(str(filename))
Version information:
>>> sys.version
'3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)]'
>>> dfi.__version__
'0.1.1'
>>> pd.__version__
'1.3.2'