Python NumPy Tutorial for Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ส.ค. 2019
  • Learn the basics of the NumPy library in this tutorial for beginners. It provides background information on how NumPy works and how it compares to Python's Built-in lists. This video goes through how to write code with NumPy. It starts with the basics of creating arrays and then gets into more advanced stuff. The video covers creating arrays, indexing, math, statistics, reshaping, and more.
    💻 Code: github.com/KeithGalli/NumPy
    🎥 Tutorial from Keith Galli. Check out his TH-cam channel: / @keithgalli
    ⭐️ Course Contents ⭐️
    ⌨️ (01:15) What is NumPy
    ⌨️ (01:35) NumPy vs Lists (speed, functionality)
    ⌨️ (09:17) Applications of NumPy
    ⌨️ (11:08) The Basics (creating arrays, shape, size, data type)
    ⌨️ (16:08) Accessing/Changing Specific Elements, Rows, Columns, etc (slicing)
    ⌨️ (23:14) Initializing Different Arrays (1s, 0s, full, random, etc...)
    ⌨️ (31:34) Problem #1 (How do you initialize this array?)
    ⌨️ (33:42) Be careful when copying variables!
    ⌨️ (35:45) Basic Mathematics (arithmetic, trigonometry, etc.)
    ⌨️ (38:20) Linear Algebra
    ⌨️ (42:19) Statistics
    ⌨️ (43:57) Reorganizing Arrays (reshape, vstack, hstack)
    ⌨️ (47:29) Load data in from a file
    ⌨️ (50:20) Advanced Indexing and Boolean Masking
    ⌨️ (55:59) Problem #2 (How do you index these values?)
    ⭐️ Links with more info ⭐️
    🔗 NumPy vs Lists: / channel
    🔗 Indexing: docs.scipy.org/doc/numpy-1.13...
    🔗 Array Creation Routines: docs.scipy.org/doc/numpy/refe...
    🔗 Math Routines Docs: docs.scipy.org/doc/numpy/refe...
    🔗 Linear Algebra Docs: docs.scipy.org/doc/numpy/refe...
    --
    Learn to code for free and get a developer job: www.freecodecamp.org
    Read hundreds of articles on programming: www.freecodecamp.org/news

ความคิดเห็น • 522

  • @TheNotoriousFonzy
    @TheNotoriousFonzy 2 ปีที่แล้ว +55

    Keith, I've taken a heavy interest in data science lately and your courses absolutely rock !!!
    Many thanks to you for teaching me these fundamentals in such an informative, easy-to-understand manner.

    • @George-te4ms
      @George-te4ms 2 ปีที่แล้ว +1

      how is the progress?

  • @cram2208
    @cram2208 4 ปีที่แล้ว +44

    Seriously, side-by-side comparisons are the BEST !! As visual as it can get ! 🙏

  • @bluegtturbo
    @bluegtturbo 4 ปีที่แล้ว +39

    You Sir are an amazing teacher!! There are many software gurus in the world, but sadly few who can impart their knowledge as you do...

  • @shritishaw7510
    @shritishaw7510 2 ปีที่แล้ว +4

    finally, done with the entire video, tbh, it took me 6 hours to get myself acquainted with the working of the NumPy library and the Jupyter notebook. Thank you for this awesome tutorial

  • @arthurgomberg164
    @arthurgomberg164 3 ปีที่แล้ว +11

    Well done. Quick ,short & straight to the point!

  • @jozbornn
    @jozbornn 3 ปีที่แล้ว +135

    This was a phenomenal overview of numpy. I feel confident that I can tackle more advanced topics now!

  • @cornelius600
    @cornelius600 4 ปีที่แล้ว +257

    1.25 speed is perfect, thanks for the video

  • @rajdeepchakraborty7961
    @rajdeepchakraborty7961 3 ปีที่แล้ว +30

    One of the finest Numpy tutorials. Keep up the great work guys!

  • @smiley-wu1kn
    @smiley-wu1kn ปีที่แล้ว +10

    This is the first tutorial that I actually finished. Thank you, Keith!

  • @SK-zl3qg
    @SK-zl3qg 3 ปีที่แล้ว +28

    Absolute clarity and upto speed. Very comprehensive coverage.

    • @63khushalsolanki9
      @63khushalsolanki9 2 ปีที่แล้ว +9

      Thats the most english I have heard all day

    • @shdnas6695
      @shdnas6695 2 ปีที่แล้ว

      @@63khushalsolanki9 lol

  • @gokul8747
    @gokul8747 3 ปีที่แล้ว +461

    ⭐️ Course Contents ⭐️
    ⌨️ (01:15) What is NumPy
    ⌨️ (01:35) NumPy vs Lists (speed, functionality)
    ⌨️ (09:17) Applications of NumPy
    ⌨️ (11:08) The Basics (creating arrays, shape, size, data type)
    ⌨️ (16:08) Accessing/Changing Specific Elements, Rows, Columns, etc (slicing)
    ⌨️ (23:14) Initializing Different Arrays (1s, 0s, full, random, etc...)
    ⌨️ (31:34) Problem #1 (How do you initialize this array?)
    ⌨️ (33:42) Be careful when copying variables!
    ⌨️ (35:45) Basic Mathematics (arithmetic, trigonometry, etc.)
    ⌨️ (38:20) Linear Algebra
    ⌨️ (42:19) Statistics
    ⌨️ (43:57) Reorganizing Arrays (reshape, vstack, hstack)
    ⌨️ (47:29) Load data in from a file
    ⌨️ (50:20) Advanced Indexing and Boolean Masking
    ⌨️ (55:59) Problem #2 (How do you index these values?)

  • @tonyhathuc
    @tonyhathuc 3 ปีที่แล้ว +17

    This is absolutely great content! Thank you so much for doing this!

  • @dohkang3725
    @dohkang3725 ปีที่แล้ว +3

    Thank you for great video, Keith Galli. I had some problem of understanding Numpy before. Thanks to your help, I have strong basic knowledge of Numpy :)

  • @Luxcium
    @Luxcium 4 ปีที่แล้ว +12

    This guy is smart and he makes this stuff really interesting !!! I like it !!!

  • @SMFahim-vo5zn
    @SMFahim-vo5zn 4 ปีที่แล้ว +5

    Just finished it. It was really awesome! I like how you would look at your notes, so that we don't see you 😂. Thanks a lot for this tutorial Keith Galli. Not following any other tutorial on Numpy. Take love!

  • @rogerknight8092
    @rogerknight8092 4 ปีที่แล้ว +6

    Much better than courses that I've paid good money for - Top Man Galli

  • @nicholasziglio
    @nicholasziglio 4 ปีที่แล้ว +6

    Really well put together, thanks! :)

  • @cameronp3157
    @cameronp3157 ปีที่แล้ว +2

    Amazing! Thank you for the explanation dude. It is really helping me with a certification course that I’m taking now

  • @flow2917
    @flow2917 ปีที่แล้ว +4

    great vid, thanks for leaving the little mistakes in there, helps me remember that I dont have to be perfect at this and remember every little thing

  • @Tradesbycami
    @Tradesbycami ปีที่แล้ว +3

    Thanks for the free class! I'm just learning programming :) I felt very motivated after I could make the array on Problem #1

    • @tonyohore288
      @tonyohore288 ปีที่แล้ว

      learning as well, would u like a study budy?

  • @laiqianji7078
    @laiqianji7078 ปีที่แล้ว +1

    Nice mate! What a wonderful review from all the possible uses of Numpy. Thanks a lot!

  • @rickpala_
    @rickpala_ 4 ปีที่แล้ว +3

    excellent tutorial. feeling comfortable with numpy now thanks to you :)

  • @fabrizio.anichini98
    @fabrizio.anichini98 3 ปีที่แล้ว +5

    Thanks you Keith , great video (also subscribed to your channel). Also thanks to FCC , love you for your service!

  • @steevenkenny9791
    @steevenkenny9791 ปีที่แล้ว +7

    Thank you very much sir... the course is crystal clear... thank you

  • @judeleon8485
    @judeleon8485 3 ปีที่แล้ว +1

    Thanks so much Keith, for the very educating tutorial. Quite explanatory

  • @cangulmez9248
    @cangulmez9248 2 ปีที่แล้ว

    This video improved my numpy information. So thanks everybody who contributed.

  • @stoyangeorgiev77
    @stoyangeorgiev77 3 ปีที่แล้ว +35

    for the part at 31:50
    a = np.zeros((5,5), dtype='int8')
    a[:,0:5:4], a[0:5:4,:], a[2,2] = 1, 1, 9

  • @mrak8948
    @mrak8948 ปีที่แล้ว +31

    imp points:
    5:38 contiguous memory
    8:28 how are lists diff than Numpy
    9:42 applications of numpy
    26:17 full and full like

  • @nutellabrownbelt9023
    @nutellabrownbelt9023 ปีที่แล้ว +1

    Super helpful tutorial.
    When you went back and used -1 indexes instead of exclusive 4's at 33:36 my world stopped imploding. Thank you.

    • @mechtorious
      @mechtorious 4 หลายเดือนก่อน

      Why tho?

  • @avivran1198
    @avivran1198 3 ปีที่แล้ว

    Thanks for your effort and the good stuff. Effective introductory! Thanks

  • @user-yt7vl3uh7g
    @user-yt7vl3uh7g 7 หลายเดือนก่อน

    love the content ! i have just started to learn numpy for my course and this certainly helped !! cheers , would be looking forward to your content!

  • @user-cy3je1xd1c
    @user-cy3je1xd1c 3 ปีที่แล้ว +13

    Thank you! The only thing was a little bit complicated to me is working with axis. None the less, great tutorial!

    • @user-tf1bs6yy3b
      @user-tf1bs6yy3b ปีที่แล้ว

      رحؤنشضهكبءخؤذمء ء يددحمس

  • @rajanalexander4949
    @rajanalexander4949 2 ปีที่แล้ว +2

    Excellent pace and explanations -- thank you!

  • @marco.nascimento
    @marco.nascimento 4 ปีที่แล้ว

    This is a great tutorial, thanks!!

  • @PBJYM
    @PBJYM 3 ปีที่แล้ว

    Thank you bro! This was an amazing tutorial!

  • @san.s.shriyan
    @san.s.shriyan 3 ปีที่แล้ว +1

    Even OpenCV a top choice among computer vision professionals uses numpy array to store the image data....
    Basically if you know how to manipulate numpy array you can do fine / pixel level operations...
    really appreciate your video.

  • @rafaelgpq
    @rafaelgpq ปีที่แล้ว +1

    Awesome Tutorial. Thank you very much, Keith !

  • @tempor8336
    @tempor8336 4 ปีที่แล้ว +1

    Thank you dude ! That was great !

  • @CzechPatriot1918
    @CzechPatriot1918 9 หลายเดือนก่อน +15

    Watching this at 2x speed so I can learn Numpy in 29 minutes instead of 58 minutes.

    • @krrishkataria560
      @krrishkataria560 5 หลายเดือนก่อน

      i have installed video controller extension, i am watching at 2.5x

    • @biological-machine
      @biological-machine 3 หลายเดือนก่อน

      @@krrishkataria560Just don't watch the video and read the specific documentation. It will be even faster if you have skill.

  • @mamadouaw3129
    @mamadouaw3129 7 หลายเดือนก่อน

    Best crash course on Numpy ! Thank you for your interesting videos

  • @hasandaaboul5322
    @hasandaaboul5322 11 หลายเดือนก่อน +1

    Really amazing introduction to numpy, it helps a lot
    Thank you man!

  • @shainamehta408
    @shainamehta408 2 ปีที่แล้ว

    Thank You for clearing my concepts on NumPy library.

  • @nakjoonim
    @nakjoonim 3 ปีที่แล้ว

    Thank you so much for this amazing video!

  • @mahbleh404
    @mahbleh404 5 หลายเดือนก่อน

    one of the best numpy tutorial ever

  • @robsonsilvadasilva
    @robsonsilvadasilva 4 ปีที่แล้ว +37

    The second exercise from last part we can do this as well: a[range(0,4),range(1,5)]

    • @bhavpreetsingh1842
      @bhavpreetsingh1842 3 ปีที่แล้ว +2

      shouldn't the two range functions be in square brackets so as to make them a list

    • @robsonsilvadasilva
      @robsonsilvadasilva 3 ปีที่แล้ว +2

      @@bhavpreetsingh1842 Hello Bhavpreet. I think that is a good practice to use square brackets to read the function, but it`s not necessary. You can test and see that works :)

    • @akshat2778
      @akshat2778 3 ปีที่แล้ว

      Even i did the same way ✌️🤟

    • @lbars
      @lbars 3 ปีที่แล้ว +1

      Mine: np.hstack(a[0:4, 1:5])[0:19:5]

    • @brettnelson7518
      @brettnelson7518 3 ปีที่แล้ว

      a = Np.arrane([0, 4] [1,5]) is more efficient

  • @RaynerGS
    @RaynerGS 3 ปีที่แล้ว +2

    Good job, way to go. Salute from Brazil.

  • @mohamedgaal5340
    @mohamedgaal5340 ปีที่แล้ว

    Thank you Keith for this awesome tutorial!

  • @justforwork5343
    @justforwork5343 2 ปีที่แล้ว

    ur tutorial IS AWESOME, plz do more man i also watched ur pandas too and it was as expectedly AWESOME tnx for the help man i appreciate it

  • @PawanKumar-tu6ti
    @PawanKumar-tu6ti 3 ปีที่แล้ว

    Thanks a lot for this video!! much appreciated really !

  • @muhammadmuzammil2140
    @muhammadmuzammil2140 4 ปีที่แล้ว +1

    Great video and awesome examples

  • @prazzaldebnath5930
    @prazzaldebnath5930 3 ปีที่แล้ว

    Great tutorial completed full. Love from heart

  • @DJ-ct6so
    @DJ-ct6so 7 หลายเดือนก่อน

    Excellent sir, very well explained !! Many thanks for uploading. 5 stars. ⭐⭐⭐⭐⭐

  • @shrikantrane9601
    @shrikantrane9601 4 ปีที่แล้ว +51

    Great Tutorial .. can u upload the pandas, scikit learn also.. So we will get the complete basic ml package

  • @Mushsayer
    @Mushsayer 3 ปีที่แล้ว

    Thank you very much for sharing the video. It was very helpful.

  • @BlitzHitz
    @BlitzHitz 3 ชั่วโมงที่ผ่านมา

    Thank you for uploading this.

  • @sahilkhandelwal8534
    @sahilkhandelwal8534 3 ปีที่แล้ว

    Great video . God bless you and you keep making such great videos

  • @anujdubey7324
    @anujdubey7324 5 หลายเดือนก่อน

    Just completed this tutorial. Thanks a lot for the content. Peace Out!!

  • @misketbey
    @misketbey 2 ปีที่แล้ว

    Very good job, it was very helpful to me, thank you!

  • @redviper20
    @redviper20 3 ปีที่แล้ว

    Here's how you watch these videos:
    Hover over your right arrow key and hit it when he's initializing or doing some boring stuff,
    and when something interesting happens, something you might wanna know, you stop, pay attention, maybe type something similar in your own jupyter notebook; continue.
    Don't watch it at 2x speed. It doesn't work...
    Reading docs is hard! So this video is really cool.

  • @aneeshkhandelwal3807
    @aneeshkhandelwal3807 2 ปีที่แล้ว

    Fantastic Tutorial !!!!
    Loved It !!!

  • @frankservant5754
    @frankservant5754 2 ปีที่แล้ว

    Thanks bro you I have learnt a TON of stuff from your tutorials

  • @artistpw
    @artistpw 11 หลายเดือนก่อน

    Love. this. Truly great content and it was even nice to see the little faux pas because everyone has those!

  • @thinhtruong6583
    @thinhtruong6583 3 ปีที่แล้ว

    thanks for making this video ! It's helpful !

  • @maryanivanov961
    @maryanivanov961 3 หลายเดือนก่อน

    Thanks for this amazing course!!

  • @trisolation
    @trisolation 4 ปีที่แล้ว

    Great video.
    Thanks!

  • @nasser_omar
    @nasser_omar 3 ปีที่แล้ว +1

    Thanks a lot, man. You are amazing.

  • @sankarmunirathinam115
    @sankarmunirathinam115 6 หลายเดือนก่อน

    Awesome Keith, thank you for this great video

  • @TheTechchan
    @TheTechchan ปีที่แล้ว +2

    Thank You! 😊

  • @minhduc8a21
    @minhduc8a21 9 หลายเดือนก่อน

    Thank you for the useful content. The very quick start with numpy.

  • @huehuehue13
    @huehuehue13 2 ปีที่แล้ว

    Great video. LOVED IT!

  • @FacuBradaschia
    @FacuBradaschia 2 ปีที่แล้ว

    Excellent video. Thank you so much.

  • @Yo5463
    @Yo5463 4 ปีที่แล้ว

    At the end, I indexed [2, 8, 14, 20] as np.delete(a[a%6 == 2], -1) to make use of the cool stair pattern

  • @apexefficiency
    @apexefficiency 4 ปีที่แล้ว

    Great Tutorial!!

  • @andygordon6880
    @andygordon6880 9 หลายเดือนก่อน

    Fantastic tutorial, thank you

  • @udyan_upal
    @udyan_upal 2 ปีที่แล้ว

    completed. thanks man! u r amazing

  • @Make_Canada_Trudeau-Less-Again
    @Make_Canada_Trudeau-Less-Again 4 ปีที่แล้ว +8

    What happened to the live stream, I can't focus anymore!!!

  • @shamsmehdi3725
    @shamsmehdi3725 4 ปีที่แล้ว

    very very helpful. thank you!

  • @enahpincer6233
    @enahpincer6233 3 ปีที่แล้ว +1

    Thank you so much for this video :) :)

  • @cellphoneacademy5454
    @cellphoneacademy5454 3 ปีที่แล้ว

    Thanks for the awesome video!

  • @saifurrahman3961
    @saifurrahman3961 3 ปีที่แล้ว

    Thank You Very Much for teaching us this nicely

  • @erenjohn12345
    @erenjohn12345 ปีที่แล้ว

    Thank you so much for this video. It helped a lot.

  • @bhosalepranil16
    @bhosalepranil16 4 ปีที่แล้ว

    very good video for learning numpy every topic is covered very well.....

  • @negusuworku2375
    @negusuworku2375 ปีที่แล้ว

    Thank you. Very helpful.

  • @spinipsFI
    @spinipsFI ปีที่แล้ว

    Thanks for the tutorial! 👍

  • @ahmedmohammed-zr3hw
    @ahmedmohammed-zr3hw 4 ปีที่แล้ว +3

    thank you very much for your efforts,could you talk about pygame with pymunk on details?

  • @adarshbaderia5846
    @adarshbaderia5846 4 ปีที่แล้ว +2

    That was PRETTY amazing. Thankyou. But the most interesting thing was that I was the exact 3k'th like because I liked and unliked the video several times to confirm it.

  • @sandie_jr
    @sandie_jr 3 ปีที่แล้ว

    Thnx for these great lessons
    .😇

  • @diananggreini5089
    @diananggreini5089 ปีที่แล้ว +1

    Thank you for the video, its help me a lot to understand the concept and the function

    • @easydatascience2508
      @easydatascience2508 ปีที่แล้ว

      welcome to check my playlists also. I made most of the videos for Python and R. easy to follow.

  • @37even
    @37even 4 ปีที่แล้ว +3

    I pressed the thumb up twice as you wanted

  • @bernardopalmer8846
    @bernardopalmer8846 2 ปีที่แล้ว

    Great video! Just got confused on min 43:55, output 143 should be a sum, but rather we got an array.

  • @K_SE_Arpan
    @K_SE_Arpan 3 ปีที่แล้ว

    Awesome work dude.
    love from India

  • @spider279
    @spider279 ปีที่แล้ว

    Thanks you for this amazing video , great explaination

  • @epsilonator
    @epsilonator 2 ปีที่แล้ว +9

    I did the matrix exercise a bit differently:
    arr = np.ones((5, 5))
    arr[1:-1, 1:-1] = np.zeros((3, 3))
    arr[2, 2] = 9

    • @NinjaTxGaming
      @NinjaTxGaming ปีที่แล้ว +2

      Nice. I noticed, you can also just use 0 instead of np.zeros((3, 3))

  • @TheGreatAnnouncer
    @TheGreatAnnouncer 2 ปีที่แล้ว

    Thanks for everything big man

  • @frankvalenti8350
    @frankvalenti8350 3 ปีที่แล้ว

    Very well done!!!

  • @ewagorka2565
    @ewagorka2565 3 ปีที่แล้ว

    Very good! Thanks a lot :)

  • @luism5822
    @luism5822 3 ปีที่แล้ว +1

    The first 11 minutes of the video have really useful info

  • @rohankandra1928
    @rohankandra1928 3 ปีที่แล้ว +4

    We can also solve the exercise at 33' using
    output = np.ones((5,5))
    print(output)
    output[1:4,1:4]=0
    print(output)
    output[2,2]=9
    print(output)

    • @foofoo17
      @foofoo17 3 หลายเดือนก่อน

      I solved it in the same way as you :)

  • @alejandrocoronado1131
    @alejandrocoronado1131 ปีที่แล้ว

    Thanks man. Great content. Cheers

  • @adityachhetry6173
    @adityachhetry6173 3 ปีที่แล้ว

    Thank you for the lesson