I'm new to stackoverflow, so sorry if this is basic. I'm trying to show a code block with sample output to clarify my question. I know how to add a code block (indenting with 4 space) but I can't figure out how to show the output. import pandas as pd df = pd.DataFrame({'item_id':[1,2,1,1,2], 'shop_id':['S1', 'S1', 'S1', 'S2', 'S2'], 'price':[10, 20, 10, 12, 18]}) df In a Jupyter notebook, the above will print the dataframe and I have seen other posts displaying results. How can do it? **Attempts:** 1. I have gone through [this][1] post which suggests that I can copy and paste the output from Jupyter but that didn't work. 2. I have tried to save my notebook as **html** and then insert the html snippet here. I thought when I run it it would display the output but it shows the entire html code instead. 3. Take a screenshot of my notebook and insert a link to it here. But I don't think this is the proper way to ask a question. [Please see example of what I wanted to post][2] Thank you! [1]: https://meta.stackexchange.com/questions/295700/easy-way-to-post-my-jupyter-notebook-output-in-a-stack-overflow-post [2]: https://i.sstatic.net/5L7QH.png