Python Forum
How to hide code Jupyter Notebook
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to hide code Jupyter Notebook
#1
Hi,

In Jupyter Notebook you can embed a web video with a code cell like:
from IPython.display import HTML

HTML('<iframe width="560" height="315" src="https://www.youtube.com/embed/nKW8Ndu7Mjw?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>')
However, when that is run you get the following, which is ugly:
   

I found what was supposed to be a solution, by adding a comment on first line:
# @hidden_cell
But it doesn't appear to work.
Does anyone know what works. I want to see the video, but not the code.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  My code works on Jupyter Lab/Notebook, but NOT on Visual Code Editor jst 4 876 Nov-15-2023, 06:56 PM
Last Post: jst
  Navigating file directories and paths inside Jupyter Notebook Mark17 5 628 Oct-29-2023, 12:40 PM
Last Post: Mark17
  How to programmatically stop a program in Jupyter Notebook? Mark17 11 36,293 Feb-12-2023, 01:41 PM
Last Post: jp21in
Thumbs Up Python 3 Jupyter notebook ternary plot data nicholas 0 896 Jan-21-2023, 05:01 PM
Last Post: nicholas
  Graphs from Jupyter notebook to word Scott 0 837 Nov-28-2022, 06:16 AM
Last Post: Scott
  Opening an empty Jupyter notebook in VSCODE Krischu 3 1,771 Mar-09-2022, 01:57 PM
Last Post: Larz60+
  How to do line continuation in Jupyter Notebook? Mark17 4 5,359 Sep-22-2021, 04:22 PM
Last Post: ibreeden
  Jupyter Notebook as IDE bytecrunch 0 1,580 Sep-12-2021, 07:41 PM
Last Post: bytecrunch
  It says there is no keras in jupyter notebook. it is wrong there is a keras install Led_Zeppelin 0 1,849 Apr-27-2021, 08:29 PM
Last Post: Led_Zeppelin
  importing matplotlib in jupyter notebook Led_Zeppelin 4 3,400 Feb-25-2021, 07:28 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020