5 Jupyter Notebook Tips & Tricks to Improve your Data Science Workflow!

Поділитися
Вставка
  • Опубліковано 7 чер 2024
  • Visit brilliant.org/KeithGalli/ to get started learning STEM for free, and the first 200 people will get 20% off their annual premium subscription
    In this video we walk through some of my favorite tips & tricks for doing data science with Jupyter Notebooks. Many of these tips have helped me become more efficient writing Python code for my data science projects.
    Topics covered:
    - Running bash commands from a jupyter notebook. You can use “!” in a code cell to run any terminal command that you want. You can also try using the “%” to execute magic lines. This includes some of the same bash commands that you might gravitate to as well as some Jupyter specific commands.
    - The most useful shortcuts that I think you should know. Ctrl+enter to run a cell, shift+enter to run a cell and skip to the next, B to create new cells below, M to turn a cell to markdown, and several more. We will also look at find & replace in this section.
    - Changing pandas default display settings (number of rows to display, columns, decimal points, etc.)
    - Turning on OS alerts for running Jupyter Notebook cells. This is particularly useful if you have a long machine learning model training job going on and you want to know exactly when it finishes so that you can play around with the results.
    - Creating slideshows within a Jupyter notebook!
    Bonus topic:
    - Changing your Jupyter Notebook theme! Monokai is a good one to use if you like dark-themes
    Source code:
    github.com/KeithGalli/Data-Sc...
    If you have any questions about these tips & tricks, or if you have additional recommendations, please let me know in the comments!
    I hope you enjoyed this video! Please subscribe & give it a like if you did.
    Resources:
    - towardsdatascience.com/8-comm...
    Learn more about magic commands "%": ipython.readthedocs.io/en/sta...
    -------------------------
    Follow me on social media!
    Instagram | / keithgalli
    Twitter | / keithgalli
    TikTok | / keithgalli
    -------------------------
    Song at the end
    good morning by Amine Maxwell / aminemaxwell
    Creative Commons - Attribution 3.0 Unported - CC BY 3.0
    Free Download / Stream: bit.ly/2vpruoY
    Music promoted by Audio Library • Good morning - Amine M...
    -------------------------
    If you are curious to learn how I make my tutorials, check out this video: • How to Make a High Qua...
    Practice your Python Pandas data science skills with problems on StrataScratch!
    stratascratch.com/?via=keith
    Join the Python Army to get access to perks!
    UA-cam - / @keithgalli
    Patreon - / keithgalli
    *I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
    This video was sponsored by Brilliant.org
    -------------------------
    Video timeline!
    0:00 - Introduction & video overview
    0:25 - Shoutout to this video’s sponsor, Brilliant.org!
    2:11 - 1. Running terminal commands such as “pip” directly in a notebook
    5:17 - Magic lines in Jupyter
    6:11- 2. Shortcuts that you need to know for Jupyter!
    9:25 - 3. Changing default Pandas options to improve results display
    14:00 - 4. Setting up notifications for when a cell finishes execution
    18:08 - 5. Creating slideshows from a IPython notebook!
    23:00 - Conclusion (and link to bonus tip!)

КОМЕНТАРІ • 68

  • @KeithGalli
    @KeithGalli  2 роки тому +5

    Thank y'all for watching! Check out brilliant.org/keithgalli for good computer science & algorithms courses! First 200 people will get 20% off their annual premium subscription 🤠

    • @masternobody1896
      @masternobody1896 2 роки тому

      can you make how to get a job at google course. thanks

    • @masternobody1896
      @masternobody1896 2 роки тому

      yo bro you should read quran with an open mind. it gave me life purpose

  • @prasenjity2k
    @prasenjity2k Рік тому +1

    Awesome insights ! loved the tricks, was unaware of slideshow. Many thanks @keith for sharing.

  • @jawad7776
    @jawad7776 2 роки тому

    Excellent bro, really appreciate the way you just mentioned these points and tricks to use the JNB more efficiently...

  • @manyes7577
    @manyes7577 2 роки тому

    wow the find and replace method is pretty useful. Thanks a lot Keith. Really appreciate it.

  • @wiz8058
    @wiz8058 2 роки тому +3

    Keith is back with the fire 🔥 💪🏾

    • @KeithGalli
      @KeithGalli  2 роки тому +1

      Thank you for the support as always my guy!!

  • @BillyT83
    @BillyT83 2 роки тому

    Another insightful video👍! I think for Bash commands there is also the Jupyter kernel for Bash.

  • @sunny739
    @sunny739 2 роки тому

    thank you @Keith for amazing information

  • @parzynamea4701
    @parzynamea4701 2 роки тому

    looking good! thanks for another tutorial keep going

  • @lucianocarneiro5962
    @lucianocarneiro5962 2 роки тому

    great tips! Thanks Keith!

  • @srushtimadewar4077
    @srushtimadewar4077 2 роки тому

    Much needed video❤️

  • @WWG1-WGA
    @WWG1-WGA 9 місяців тому

    Thanks men! , very useful !

  • @YeekyYeeky
    @YeekyYeeky 2 роки тому

    great video Keith , thank you

    • @KeithGalli
      @KeithGalli  2 роки тому

      You're welcome, glad you enjoyed :)

  • @schuylerblasy2192
    @schuylerblasy2192 2 роки тому

    Nice! Thanks Keith!

  • @abhaytiwari5991
    @abhaytiwari5991 2 роки тому

    Thanks Keith wonderful video 📸

  • @khushbunikhal4596
    @khushbunikhal4596 Рік тому

    Tum bahot mast kaam karta he . Thank you really so much for this !!🤩🤩

  • @rajvaghasia9942
    @rajvaghasia9942 2 роки тому +3

    One of the feature I recently came across is df.style
    This function display all columns and rows whenever there is cutoff on rows & columns.
    Hope you find it useful

    • @KeithGalli
      @KeithGalli  2 роки тому +1

      Cool tip! I didn't know about that one. I'm going to try it out, thanks!!

  • @rodrigodasilva9176
    @rodrigodasilva9176 2 роки тому

    This boy has grown up! Cheers

    • @KeithGalli
      @KeithGalli  2 роки тому

      Haha you're the second person to say this! I'll take it :)

  • @prof_albert
    @prof_albert Рік тому

    Bravo man. 👌💞🤩🌺😊💪
    You are the best. Keep going on 💪

  • @abdullahjaffrey7750
    @abdullahjaffrey7750 2 роки тому +5

    Hi Keith. Thanks for making this video.❤ Can you please make a video on "Analyzing data with the help of SQL".❤

    • @KeithGalli
      @KeithGalli  2 роки тому +6

      I'll try to do something with SQL at some point in the not so distant future. To be honest my SQL skills are a bit rusty right now!

    • @abdullahjaffrey7750
      @abdullahjaffrey7750 2 роки тому

      @@KeithGalliNo problem keith!!

    • @manishmaddeshiya4817
      @manishmaddeshiya4817 Рік тому

      Hey Keith try to make beginner level project for data science

  • @keijiu5533
    @keijiu5533 2 роки тому

    Hi Keith. I have been following and watching your videos for a long time. I really appreciate all your teaching and sharing. What do you think of JupyterLab? I used to use VS Code with Jupyter extension until it has issue with animated plot in plotly. It forced me to switch back to original Jupyter family. Accidentally I discover the JupyterLab and give it a shot. It has file browser which is good for file locating and mouse clicking. It has terminal to run command lines. It can also create and edit ipynb file, py file and txt file. What's more is it has window splitting function by simply using mouse to drag. I can image how cool it is to display on a 32 inch monitor or even larger! Wonder your opinion on it, especially the drawbacks!

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 2 роки тому

      It seems like JupyterLab will take over from old-style Jupyter at some point. It certainly has the more advanced UI.

  • @franklegacy1354
    @franklegacy1354 Рік тому

    I know I am late, but how do you deal with drop downs while scraping especially on a page that some of the drop downs have been toggled automatically, and what if the drop downs are in different areas on every refresh.

  • @mikekramer7737
    @mikekramer7737 2 роки тому +1

    Tnx. After 2 year of Jupyter work I finally learnt how to use the DD option. Any specific tips on Jupyter Lab ?

    • @KeithGalli
      @KeithGalli  2 роки тому

      Nice! I don't typically use Jupyter Lab so don't have any specific tips there

  • @kingjosh3451
    @kingjosh3451 5 днів тому

    How do you get the run button on the left of the code cell?

  • @snorky4506
    @snorky4506 10 місяців тому

    Julia - it's the Ju in Jupyter. Still hoping you'll come around and give us some Julia tutorials.

  • @miguelsaavedrums
    @miguelsaavedrums 2 роки тому

    I wish you nothing but the best

  • @m.g.matthewshin4210
    @m.g.matthewshin4210 Рік тому +1

    Hi Keith, I tried to follow along with your video but seems like my Jupyter Notebook doesn't accept any bash command. Do you have any idea how I should setup to run ! command? I tried this with Anaconda3 on Windows 11. Many thanks!

    • @jellovero
      @jellovero Рік тому

      i'm having the same issue. did you ever figure it out?

  • @amansorout.6779
    @amansorout.6779 2 роки тому

    Love & support from India.

  • @_Clipper_
    @_Clipper_ 20 днів тому

    Hey, whenever i try to use %%notify, i get a javascript error saying $ is not defined. Can't find anything relating to this on the web.

  • @premkumarramanathan8848
    @premkumarramanathan8848 Місяць тому

    !ls is not recognized as an internal or external command, operable program or batch file. I'm using Anaconda in Windows 10. How to solve this problem, please help.

  • @arunm9034
    @arunm9034 2 роки тому

    Got really introduced to so-called REST API! #learnbydoing

  • @anthonykimcuady9317
    @anthonykimcuady9317 Рік тому

    What laptop are you using? 🙂

  • @physicsfaith
    @physicsfaith 6 місяців тому

    Very little of this works on my Windows computer... is it just me, or the way that it is?

  • @anonviewerciv
    @anonviewerciv 2 роки тому

    Pretty sure those keyboard shortcuts are also noted in the menus.

  • @konstantinpluzhnikov4862
    @konstantinpluzhnikov4862 2 роки тому

    Hi Keith! Do you read messages from Patreon?

    • @KeithGalli
      @KeithGalli  2 роки тому

      Yeah I do! If I missed something from you there, I apologize. I'll check my messages there later today :)

    • @konstantinpluzhnikov4862
      @konstantinpluzhnikov4862 2 роки тому

      @@KeithGalli I have received your response and followed it up. As for Masterschool I have applied, completed an assessment and got right to a waiting list. It must be a popular program.

  • @aquabestindian
    @aquabestindian 2 роки тому

    AWWWWWWWWWWWWWWWE........SOME

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 2 роки тому +1

    7:26 Pretty unnecessary to write all these out. Just go to the “Help” menu, and select “Keyboard Shortcuts”. They’re all there-and more.

    • @KeithGalli
      @KeithGalli  2 роки тому +1

      Yep you are very correct! It does help some people learning wise though to see them typed one at a time, but I should have mentioned that all of the shortcuts were available in the menu.

  • @konstantinpluzhnikov4862
    @konstantinpluzhnikov4862 2 роки тому

    Hi Keith! Could you respond to my message, please?

    • @KeithGalli
      @KeithGalli  2 роки тому

      I've been traveling, will respond as soon as I can!

  • @benstallone6784
    @benstallone6784 2 роки тому

    Better respond to your mom

    • @KeithGalli
      @KeithGalli  2 роки тому

      Haha don't worry I did and made it home for dinner on time 🤠

  • @matthewhsu7299
    @matthewhsu7299 2 роки тому

    You look different from your previous vedio...like more mature...

    • @KeithGalli
      @KeithGalli  2 роки тому

      Interesting! I have gained some weight which might be a reason for that

  • @capincrunch1184
    @capincrunch1184 Рік тому

    I’m having trouble pip installing python libraries from a repository, so it’s a URL that i need to enter a username and password I would like to know what commands I can use because for JupiterHub I’m not having any luck

  • @RR-hq4cv
    @RR-hq4cv 2 роки тому

    I wish you have made this video 2 years ago! Anyway, the "max_colwidth" feature is a surprise for me! Thank you for the video! We appreciate it.

    • @KeithGalli
      @KeithGalli  2 роки тому

      Hahaha well at least i made it now :). Glad you enjoyed it!