Using Markdown in Jupyter

Ғылым және технология

Jupyter notebooks aren't just for code. They're for documentation and explanations, too! In this video, I show you how you can use Markdown to format cells in Jupyter, opening the door to including headlines, boldface, italic, bulleted lists, hyperlinks, and even images -- with a minimum of fuss. I write all about Python in my free, weekly "Better developers" newsletter, at BetterDevelopersWeekly.com/, currently read by more than 16,000 Python developers each week.

Пікірлер: 130

  • @nguyenson1177
    @nguyenson11774 жыл бұрын

    This short video covers most of everything you need to know about Markdown in Jupyter notebook. Thanks a lot !!!

  • @arjuntyler1317

    @arjuntyler1317

    3 жыл бұрын

    I know Im quite off topic but does anyone know of a good website to watch new series online?

  • @daxvictor7526

    @daxvictor7526

    3 жыл бұрын

    @Arjun Tyler Try FlixZone. Just search on google for it =)

  • @warhammer_music
    @warhammer_music3 жыл бұрын

    Never think of leaving YT. Very few can teach with so much efficiency. Even if someone has zero background he/she can understand what you've explained.

  • @ReuvenLerner

    @ReuvenLerner

    3 жыл бұрын

    Thanks so much for the warm words! I'm not leaving KZread -- just working on a book proposal. As soon as that's done, lots more videos are on their way.

  • @nelsondelarosa5490

    @nelsondelarosa5490

    11 ай бұрын

    I agree. He is fantastic

  • @MrDavidaslv
    @MrDavidaslv3 жыл бұрын

    Thank you - I am 50 years old and I am taking Python and machine learning to expand my business career and move into future positions. I am having so much fun learning and you just made my day!!!

  • @ReuvenLerner

    @ReuvenLerner

    3 жыл бұрын

    I'm delighted to hear it! I'm also 50, have been using Python for 30 years, and am still learning more about it every day. Python is a great skill to know for your carer -- keep it up!

  • @sungdongkwon6986

    @sungdongkwon6986

    Жыл бұрын

    @@ReuvenLerner Me too, My age is 56. I'm studying Python for over 3 years in order to make use of my chemical engineering work.

  • @hannahtracy9292
    @hannahtracy92924 жыл бұрын

    huge thank you!!! i’m documenting code for the first time so i can hand it off to another team member and your video is exactly what i was looking for! you are very clear, succinct, and thorough

  • @azzouguenachour909
    @azzouguenachour9093 жыл бұрын

    Thank you professor, I'm actually working on jupyter notebook and my supervisor told me to write my hole rapport by using jupyter notebook, so you did a great tutorial by showing us the basic things to how to start doing that!

  • @jeffreyholland8538
    @jeffreyholland85383 жыл бұрын

    Thank you Reuven! I am new to coding and was running into a FileNotFoundError and was feeling discouraged. I needed to learn how to format markdowns and came across your video. Great explanations and examples. I was able to duplicate, so it's a win for this morning.

  • @charlesfu8627
    @charlesfu8627 Жыл бұрын

    The best 9 minutes I had EVER in learning any Markdowns. Awesome guide Mr. Lerner!

  • @ReuvenLerner

    @ReuvenLerner

    Жыл бұрын

    Amazing to hear; thanks!

  • @ranger133XX
    @ranger133XX3 жыл бұрын

    Thank you! You are so well spoken and have a great energy about you; I appreciate you!

  • @leonzhu6982
    @leonzhu6982 Жыл бұрын

    Thanks so much for this sharing. It's just clear and short which let me know the most parts that I will use a lot within a short time!!

  • @ReuvenLerner

    @ReuvenLerner

    Жыл бұрын

    Excellent! Thanks for letting me know.

  • @user-hu7ov6fi9y
    @user-hu7ov6fi9y3 жыл бұрын

    Great video, explaining the difference between markdown and code

  • @tsetsanakhobotlo4823
    @tsetsanakhobotlo48234 ай бұрын

    This is fantastic and straightforward. Thank you very much!

  • @ReuvenLerner

    @ReuvenLerner

    4 ай бұрын

    My pleasure; delighted to hear it helped!

  • @janesun8885
    @janesun88853 жыл бұрын

    This is very clear and super helpful! Thank you!

  • @vibhourjain
    @vibhourjain Жыл бұрын

    Awesome explanation in very short duration.

  • @IgnacioLedesmaPlus
    @IgnacioLedesmaPlus3 жыл бұрын

    Just what im looking for! Thanks a lot, greetings from Argentina

  • @dogs4ever1000
    @dogs4ever1000 Жыл бұрын

    Haha, love how passionate you are about Python! :D Thanks for the video, this is exactly what I need for documenting my data science project.

  • @ReuvenLerner

    @ReuvenLerner

    Жыл бұрын

    Excellent, I'm glad that it helped! And yeah, I really do enjoy my work...

  • @cloudwithfarooq8083
    @cloudwithfarooq80833 жыл бұрын

    Very concise and to the point.Thanks

  • @bisyrim1030
    @bisyrim10307 ай бұрын

    thank you mate, I am currently learning Python in Jupyter notbook

  • @ReuvenLerner

    @ReuvenLerner

    7 ай бұрын

    My pleasure -- notebooks are great, and keep up the learning of Python!

  • @rajatsiddamal
    @rajatsiddamal3 жыл бұрын

    It was Helpful. Thanks a lot man!!!

  • @Vintagetube310
    @Vintagetube3102 жыл бұрын

    Thank you for this!

  • @johancuellar9101
    @johancuellar91012 жыл бұрын

    THANK YOU SO MUCH I WAS SO CONFUSED BC I WASN'T PRESSING SPACE AFTER THE "#" THANK YOUUUUUUUUUUU

  • @ReuvenLerner

    @ReuvenLerner

    2 жыл бұрын

    I'm delighted to know it helped!

  • @sanjuktasamom3923
    @sanjuktasamom39232 жыл бұрын

    OMG!! You type like a robot. Very impressive. And thanks this is very helpful.

  • @tim-duncan2137
    @tim-duncan21377 ай бұрын

    thank you mr reuven great video!!

  • @ReuvenLerner

    @ReuvenLerner

    7 ай бұрын

    Glad it helped!

  • @kennethvaldeztamon7600
    @kennethvaldeztamon76003 жыл бұрын

    Thank You! It helped me a lot.

  • @thegiantpaperpanda
    @thegiantpaperpanda Жыл бұрын

    Awesome encouraging video thanks!

  • @ReuvenLerner

    @ReuvenLerner

    Жыл бұрын

    Glad you liked it!

  • @jayanth6492
    @jayanth64923 жыл бұрын

    That's very helpful.Thanks a lot

  • @tokhenz
    @tokhenz Жыл бұрын

    This is Great sir. Thank you very much!!!

  • @ReuvenLerner

    @ReuvenLerner

    Жыл бұрын

    Glad it was helpful!

  • @NOLAMarathon2010
    @NOLAMarathon20103 жыл бұрын

    Nicely done. Thanks.

  • @bhuvanesharulraj6264
    @bhuvanesharulraj62643 жыл бұрын

    Really helpful sir. thankyou.

  • @gangadharpandey3455
    @gangadharpandey34552 жыл бұрын

    Thank you sir!

  • @johngates2602
    @johngates26022 жыл бұрын

    Good work.

  • @simenandreasknudsen9272
    @simenandreasknudsen9272 Жыл бұрын

    Nice! You can also write beautiful math using the dollar sign between the equation. Ex: $ 3*x + 4 $ Use two dollar signs to center the equation. $$ 3*x + 4 $$

  • @ReuvenLerner

    @ReuvenLerner

    Жыл бұрын

    That's for LaTeX, right? I haven't ever used that, not being a math kind of guy, but it is very powerful, for sure! (And thanks for reminding me why $ messes with the formatting in Markdown...)

  • @simenandreasknudsen9272

    @simenandreasknudsen9272

    Жыл бұрын

    @@ReuvenLerner yes, LaTeX :)

  • @talal-az
    @talal-az3 жыл бұрын

    Amazing work,, keep it coming :)

  • @julia3798
    @julia37983 жыл бұрын

    great job!!! thanks a lot!

  • @vivianezago
    @vivianezago3 жыл бұрын

    Brilliant! Thank you!!

  • @hazi09
    @hazi096 ай бұрын

    Thank you so much. Is it please possible to know how to export the markdown file ? I've already tried to do it but i instead get the code (without headlines, links or images )...

  • @RonaldModesitt
    @RonaldModesitt3 жыл бұрын

    Very helpful!

  • @jessicabrock3220
    @jessicabrock32203 жыл бұрын

    Awesome, thanks

  • @yeechang7
    @yeechang72 жыл бұрын

    thank you , i like it.

  • @amit12000
    @amit120002 жыл бұрын

    very nice video

  • @homejonny9326
    @homejonny93263 жыл бұрын

    OMG, I thought that 'f' was a synthax error that was ignored by the python interpreter, but no, that is actually essential for the 'Hello, world' output o.O

  • @JesusReigns7
    @JesusReigns7 Жыл бұрын

    Thanks for this

  • @ReuvenLerner

    @ReuvenLerner

    Жыл бұрын

    Glad it helped!

  • @MsVishnu1234
    @MsVishnu12342 жыл бұрын

    Really good you are sir..

  • @ReuvenLerner

    @ReuvenLerner

    2 жыл бұрын

    Thanks for the kind words!

  • @rbrtsparkman
    @rbrtsparkman Жыл бұрын

    Thank you and bravo

  • @ReuvenLerner

    @ReuvenLerner

    Жыл бұрын

    Glad it helped!

  • @apitelrgramapitry7609
    @apitelrgramapitry76092 жыл бұрын

    Thanks 🙏

  • @motivational_gamer
    @motivational_gamerАй бұрын

    Thank you so much

  • @ReuvenLerner

    @ReuvenLerner

    Ай бұрын

    My pleasure! Thanks for letting me know.

  • @gustavoadolfofeliztavarez5015
    @gustavoadolfofeliztavarez50153 жыл бұрын

    Thanks

  • @daklina
    @daklina3 ай бұрын

    Its awesomely helpful! I'm wondering if theres something similar in Pycharm though... Thx

  • @ReuvenLerner

    @ReuvenLerner

    3 ай бұрын

    Glad you enjoyed it! The idea of "cells" that can contain either code or Markdown is special to Jupyter. So if you're using PyCharm's paid (professional) edition, then you can fire up a notebook and use Markdown there. But in a regular ol' PyCharm (or Python) file, you can't.

  • @vcstudios2974
    @vcstudios29742 жыл бұрын

    Thank you. Very helpful... And also, can we use even functions of python in a markdown cell?

  • @ReuvenLerner

    @ReuvenLerner

    2 жыл бұрын

    Happy it's helpful! So far as I know, cells can either contain executable code or Markdown, but not both. So you'll have to choose which you want. That said, you can have Markdown cells just above and below your code cells, which is what I do.

  • @teklehaimanotaman3150
    @teklehaimanotaman31503 жыл бұрын

    Excellent teaching skills Reuven. How did you develop this amazing teaching and programming skills?

  • @ReuvenLerner

    @ReuvenLerner

    3 жыл бұрын

    Thanks so much for your kind words! My "secret" is that I teach nearly every day, 4-8 hours per day. Over time, you make lots of mistakes, and try to learn from them. I often make the analogy to stand-up comedians, who try their jokes again and again and again, until they become smooth and effective (i.e., funny). I teach the same courses many times, and thus learn (often the hard way!) what explanations do and don't work.

  • @narangfamily7668
    @narangfamily7668 Жыл бұрын

    tysm

  • @ReuvenLerner

    @ReuvenLerner

    Жыл бұрын

    My pleasure!

  • @Nancivlog
    @Nancivlog3 жыл бұрын

    Thank u

  • @ReuvenLerner

    @ReuvenLerner

    3 жыл бұрын

    My pleasure!

  • @kmh9817
    @kmh98173 ай бұрын

    Thank you!!!!!!!!!!!

  • @ReuvenLerner

    @ReuvenLerner

    2 ай бұрын

    Glad it helped!

  • @kmh9817

    @kmh9817

    2 ай бұрын

    Kept using # with words without space. I thought something is wrong with my pc.

  • @salahkebi05
    @salahkebi052 жыл бұрын

    Thanks for the video...could you please tell me how to do the same with hotkeys...i mean to switch to markdown and back to code.

  • @ReuvenLerner

    @ReuvenLerner

    2 жыл бұрын

    How about this: kzread.info/dash/bejne/eItmpKhvmsWucs4.html

  • @salahkebi05

    @salahkebi05

    2 жыл бұрын

    @@ReuvenLerner Guess what? I'm watching it right now...before you sent the link...thanks.

  • @birdvsbird6280
    @birdvsbird62804 ай бұрын

    How do you get in and out to show in the cell?

  • @ReuvenLerner

    @ReuvenLerner

    4 ай бұрын

    In is a list, and Out is a dict. They're global variables, which means that they're always available when you're in Jupyter. So you can just refer to them as In[n] or Out[n], where n is the index/key of the input/output you want to mention.

  • @matteopiras483
    @matteopiras483 Жыл бұрын

    Hi! If I write a code cell, then a markdown cell and after this another code cell, is it possible to run both the code cell at the same time? (I also use Jupiter), thanks!

  • @ReuvenLerner

    @ReuvenLerner

    Жыл бұрын

    Yup, try the "run all below" option in the "cell" menu!

  • @matteopiras483

    @matteopiras483

    Жыл бұрын

    @@ReuvenLerner thanks a lot! And is it possible to write some python code in the same line and not like you did at min 6:45 where you write the code one line below? thank you!!

  • @ReuvenLerner

    @ReuvenLerner

    Жыл бұрын

    @@matteopiras483 In a Markdown cell, you need to indicate that something should be formatted as Python code. And then it's just text, not executable Python. Each cell is either Markdown or Python, but not both.

  • @matteopiras483

    @matteopiras483

    Жыл бұрын

    @@ReuvenLerner sorry, I mean when you wrote ```python code ``` Then it display the code in the markdown cell BUT it shows it below. Isn't it possible to see the code in the same line, like "hi that's the code ```python code```"? Thanks:)

  • @ReuvenLerner

    @ReuvenLerner

    Жыл бұрын

    @@matteopiras483 Not as far as I know, but someone who knows Markdown better than I do might know of a hack to pull that off!

  • @johnny_testicles
    @johnny_testicles7 ай бұрын

    Hi 👋 how can i add mathematical equations in markdown cells?

  • @ReuvenLerner

    @ReuvenLerner

    7 ай бұрын

    You want to use LaTeX. I haven't used LaTeX in many years, but here is a quick intro you can use: stackoverflow.com/questions/13208286/how-to-write-latex-in-ipython-notebook

  • @jessemutiga6055
    @jessemutiga60552 жыл бұрын

    is it in or Ln for line 1?

  • @ReuvenLerner

    @ReuvenLerner

    2 жыл бұрын

    The inputs are stored in a list called In (capital I, lowercase n). I'm not sure if that's what you're asking, though...

  • @chenwu9788
    @chenwu97882 жыл бұрын

    How to use markdown to write complex math equations Can I put markdown into Microsoft Words

  • @ReuvenLerner

    @ReuvenLerner

    2 жыл бұрын

    Markdown is an easy way to write HTML, not equations. And I don't know whether Word supports Markdown, but I'm guessing that it doesn't. You can look into LaTeX (which I have mostly forgotten) for equations in Jupyter.

  • @reemashrestha9718
    @reemashrestha97183 жыл бұрын

    How to change the color of the headings and sub-headings?

  • @ReuvenLerner

    @ReuvenLerner

    3 жыл бұрын

    What a great question! I didn't know, so I looked it up, and ... I have bad news: Markdown doesn't support color. So officially, and sticking only with Markdown, you don't have any options. However, if you're willing to get your hands dirty a bit, you can use "font" tags in HTML to set colors. See fix.code-error.com/how-to-change-color-in-markdown-cells-ipython-jupyter-notebook/ for a simple example.

  • @reemashrestha9718

    @reemashrestha9718

    3 жыл бұрын

    @@ReuvenLerner Yeah I saw that answer before. But the thing is, I couldn't use the css styling ( ) for Jupyter. Using every-time is tiring. Besides, one cannot use # inside . I was wondering if there is any other way to pre-define the setting of headings and sub-headings. Thanks for your effort. :) Great summary video.

  • @harithm9219
    @harithm92192 жыл бұрын

    Hi, tq for the video. Can you explain how to align text in markdown?

  • @ReuvenLerner

    @ReuvenLerner

    2 жыл бұрын

    What do you mean by "align text"?

  • @harithm9219

    @harithm9219

    2 жыл бұрын

    @@ReuvenLerner align the text to center, right instead of left

  • @ReuvenLerner

    @ReuvenLerner

    2 жыл бұрын

    @@harithm9219 I don't think you can. Maybe if you start to insert raw HTML and/or CSS, you can get that sort of thing to happen. But Markdown is supposed to be simple, and only provide a subset of everything HTML can do. I just skimmed through the Markdown docs (www.markdownguide.org/basic-syntax/) and didn't see anything, but maybe I'm missing something.

  • @harithm9219

    @harithm9219

    2 жыл бұрын

    @@ReuvenLerner I see. Ok thank you 👍

  • @namratasharma5081
    @namratasharma50812 жыл бұрын

    Hey, I really want to know that how can we adjust the size of the image here in the jupyter notebook??? please reply!!

  • @ReuvenLerner

    @ReuvenLerner

    2 жыл бұрын

    Jupyter is just like any other Web page. So if you want to make things bigger or smaller, you can increase/decrease your browser's magnification level. I do this all the time with command-plus and command-minus on my Mac; other systems will be slightly different.

  • @namratasharma5081

    @namratasharma5081

    2 жыл бұрын

    @@ReuvenLerner no no I want to know that like in HTML we can mention the width so can we do that here I know we can use HTML in jupyter but can we define the width ! [ ] (" " ) in this command??

  • @ReuvenLerner

    @ReuvenLerner

    2 жыл бұрын

    @@namratasharma5081 From what I can tell, the answer is "no" -- Markdown is easy to write and read, and produces HTML, but it doesn't let you mess with the styles and other attributes. But here's the reference that I use, which I definitely haven't memorized: www.markdownguide.org/

  • @namratasharma5081

    @namratasharma5081

    2 жыл бұрын

    @@ReuvenLerner Okay thank you soo much for replying and helping me 😊

  • @simulatrix
    @simulatrix3 жыл бұрын

    "Don't use this function at any of these places, it would be a little weird" Wait, I shouldn't say HELLO at parties, weddings, or dance festivals?

  • @ReuvenLerner

    @ReuvenLerner

    3 жыл бұрын

    Saying it is fine! (Assuming that there's no pandemic, etc.) But calling a function at such places might make you seem a bit creepy... :-)

  • @simulatrix

    @simulatrix

    3 жыл бұрын

    @@ReuvenLerner This is a fantastic tutorial by the way. Some of the best explained on KZread

  • @tachl7et538
    @tachl7et538 Жыл бұрын

    nice

  • @ReuvenLerner

    @ReuvenLerner

    8 ай бұрын

    Thanks -- glad you enjoyed it!

  • @vidyarajeshwarig.k8125
    @vidyarajeshwarig.k81253 жыл бұрын

    Hi sir, how to display the output of python code in html? Please help

  • @ReuvenLerner

    @ReuvenLerner

    3 жыл бұрын

    If you want to execute some Python code in a Jupyter cell and have it output as HTML... I'm not sure if that's possible, I'm afraid. The HTML output from Markdown is for us to type. I might be wrong, and will try to look into it, but I don't think so. (If someone reading this knows otherwise, let me know!)

  • @vidyarajeshwarig.k8125

    @vidyarajeshwarig.k8125

    3 жыл бұрын

    @@ReuvenLerner Thanks for your reply, Sir, displaying python output in html is possible, I got the results too Since my output was a excel table, I got the output displayed jumbled 😞 in the html screen. Any suggestions to slove this? Kindly help ❤

  • @ReuvenLerner

    @ReuvenLerner

    3 жыл бұрын

    @@vidyarajeshwarig.k8125 Python can produce HTML, for sure. But I don't know how Python code inside of a Jupyter notebook can produce HTML that's then displayed in the notebook.

  • @zedcodinacademibychinvia9481
    @zedcodinacademibychinvia94819 ай бұрын

    how do you type so fast😀

  • @ReuvenLerner

    @ReuvenLerner

    9 ай бұрын

    Lots of practice -- it's all thanks to my parents, who forced me to learn to touch type when I was in high school. It's totally worth learning!

  • @gauravkumargupta996
    @gauravkumargupta9963 жыл бұрын

    How many of you thinking about become hacker?

  • @ReuvenLerner

    @ReuvenLerner

    3 жыл бұрын

    Where I come from, calling someone a "hacker" is the biggest compliment you can give them - it means they're a virtuoso of programming, able to express themselves fluidly with code. Sadly, the term is now often used to mean "bad guys with code." I encourage everyone to learn and be fluent... but to use the technology for good, not evil!

  • @user-mw6fh5oj2c
    @user-mw6fh5oj2c7 ай бұрын

    it is painful to watch you type with backspaces and corrections

  • @ReuvenLerner

    @ReuvenLerner

    7 ай бұрын

    Sorry it's not your style.

  • @vishvamurthy8089
    @vishvamurthy80893 жыл бұрын

    Thank you. It is very Usefull!

  • @ReuvenLerner

    @ReuvenLerner

    3 жыл бұрын

    I'm delighted to hear it!

Келесі