dexplo / dataframe_image

A python package for embedding pandas DataFrames as images into pdf and markdown documents
https://dexplo.org/dataframe_image
MIT License
282 stars 41 forks source link

FutureWarning: this method is deprecated in favour of `Styler.to_html()` #37

Closed Arian96669 closed 2 years ago

Arian96669 commented 2 years ago

With recent changes to Pandas (I'm using version 1.4.0), Styler.render() is being depreciated in favour of Styler.to_html().

Inside _pandas_accessor.py, change: 68 if is_styler: 69 html = '<div>' + obj.render() + '</div>'

to 68 if is_styler: 69 html = '<div>' + obj.to_html() + '</div>'

That got rid of the future warning for me.

tdpetrou commented 2 years ago

Thank you. Will update when I have time.

fredericomattos commented 2 years ago

Thank you. Will update when I have time.

Hi @tdpetrou same here mate:

lib\site-packages\dataframe_image\_pandas_accessor.py:69: FutureWarning: this method is deprecated in favour of `Styler.to_html()`
  html = '<div>' + obj.render() + '</div>'
moshemoshe137 commented 2 years ago

Fixed by 7204ece