Search code examples
pythondataframejupyter-notebookexportpng

dataframe-image error on jupyter notebook


I was used to run dataframe-image to export my dataframes as .png, but since the last jupyter-notebook SageMaker update, it is generating an error:

[0112/173601.720702:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable. [0112/173601.862377:WARNING:sandbox_linux.cc(385)] InitializeSandbox() called with multiple threads in process gpu-process. [0112/173602.056840:INFO:headless_shell.cc(223)] 54715 bytes written to file /tmp/tmpdxxsetl4/temp.png

The code I am using is:

import pandas as pd
from IPython.display import display
import dataframe_image as dfi

df = pd.read_csv(paths, sep = ";", encoding = "utf-8").iloc[:15]
dfi.export(df, "name.png")

Solution

  • Seems like the problem has been solved here with: pip install -u dataframe_image, as answered in Error exporting styled dataframes to image

    I had this error, too.. and I had to upgrade and then could fix it.