Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

400
Visualizações
Can you embed a YouTube video in a Jupyter Notebook?

I am trying to embed a YouTube video into an existing Jupyter notebook, using the embed code and an iframe. I have seen a few other solutions where they use a code cell which is then executed - but this is not desirable, as outlined below.

I would like to embed the iframe directly into a markdown cell in the notebooks. This way we can re-use the same notebook markdown with a variety of kernels without having to change the code cells.

Do you know if this is possible or not? Does it require installing any additional tools (e.g. Node.js)?


For a minimal example, suppose I wanted to embed this code in a markdown cell:

<iframe width="560" height="315" src="https://www.youtube.com/embed/jZ952vChhuI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

If I include it in a markdown cell as follows:

# My Markdown Video

This is where the video should go:

<iframe width="560" height="315" src="https://www.youtube.com/embed/jZ952vChhuI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>```

But it's not here.

However, when this markdown cell is rendered (run) the iframe does not show up; it's just a blank. It will display if you try to print the notebook, but it's not interactive.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Not in markdown but you can use %%html at the top of a code block that doesn't mind what kernel type you're using to embed the video:

%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/jZ952vChhuI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda