An Interesting and Lesser-Known Way To Create Plots Using Pandas
blog.dailydoseofds.com
Whenever you print/display a DataFrame in Jupyter, it is rendered using HTML and CSS. This allows us to format the output just like any other web page. One interesting way is to embed inline plots which appear as a column of a dataframe. In the above snippet, we first create a plot as we usually do. Next, we return the <img> HTML tag with its source as the plot. Lastly, we render the dataframe as HTML.
An Interesting and Lesser-Known Way To Create Plots Using Pandas
An Interesting and Lesser-Known Way To Create…
An Interesting and Lesser-Known Way To Create Plots Using Pandas
Whenever you print/display a DataFrame in Jupyter, it is rendered using HTML and CSS. This allows us to format the output just like any other web page. One interesting way is to embed inline plots which appear as a column of a dataframe. In the above snippet, we first create a plot as we usually do. Next, we return the <img> HTML tag with its source as the plot. Lastly, we render the dataframe as HTML.