A Gentle Introduction to Pandas Data Analysis (on Kaggle)

Поделиться
HTML-код
  • Опубликовано: 11 май 2024
  • In this video you will learn the basics of how to use pandas in python for data science. Rob Mulla, kaggle grandmaster, will walk through the tutorial in a kaggle notebook. This pandas python tutorial for data science is great for anyone new to learning this technology. Pandas is a MUST for anyone getting into data science with python. Python is the #1 coding language for data science and has been growing over the years as an essential tool, with Pandas being the main data wrangling module. In this video we discuss the basics of how to use pandas including...
    Timestamps:
    00:00 Introduction
    02:44 Series data structure
    05:04 DataFrame data structure
    10:01 Reading in data
    12:17 Inspect The Data
    15:25 Columns and Rows
    19:00 Subsetting Data
    25:45 Casting dtypes
    29:00 Creating new column
    31:19 Adding new Row
    33:05 Plot Examples
    36:45 Save out the output as a csv
    Follow me on twitch for live coding streams: / medallionstallion_
    Link to kaggle notebook used in the tutorial: www.kaggle.com/robikscube/the...
    * RUclips: / @robmulla
    * Twitch: / medallionstallion_
    * Twitter: / medalliondata
    * Kaggle: www.kaggle.com/robikscube
    #DataScience #Pandas #Python #Coding

Комментарии • 149

  • @soumyadrip
    @soumyadrip 2 года назад +32

    Timestamps:
    Introduction: 0:00
    Pandas data structure: Series 2:44
    Pandas data structure: Series 5:04
    Reading in data: 10:01
    Inspect The Data: 12:17
    Columns and Rows: 15:25
    Subsetting Data: 19:00
    Casting dtypes: 25:45
    Creating new column: 29:00
    Adding new Row: 31:19
    Plot Examples: 33:05
    Save our output: 36:49

    • @robmulla
      @robmulla  2 года назад +4

      You are awesome @somuSan! Thanks so much for tagging these.

    • @soumyadrip
      @soumyadrip 2 года назад +6

      @@robmulla Nah no problem 😅, you are the awesome here, creating such a great end to end tutorial.

  • @Abdolahy
    @Abdolahy 9 месяцев назад

    Hi there Rob! I wanna thank you for this fantastic tutorial you made on EDA with Python Pandas library. That really was the most impressive EDA tutorial I've ever watched on YT.

  • @chacehawkins4708
    @chacehawkins4708 8 месяцев назад +1

    First pandas or python tutorial I was able to watched more than 10 min of in one sitting. Great job. Looking forward to following you here and on twitch

  • @nasranruwaidi
    @nasranruwaidi 11 месяцев назад

    Amazing introduction for pandas. This video alone just already covered most of my reporting needs.Thank you

  • @Cpt_Diabetes
    @Cpt_Diabetes 5 месяцев назад

    absolutely loved this video, one of the best walkthroughs out right now

  • @kapamagicman
    @kapamagicman Месяц назад

    Really great! I love how you go through step by step and with the end to end examples. Thank you!

  • @gabrielacolen7281
    @gabrielacolen7281 9 месяцев назад +1

    THank you so much for this video. The quality is amazing and you are such a good teacher.

  • @jorgeimperial-sosa9097
    @jorgeimperial-sosa9097 11 месяцев назад

    Excellent intro. I had been toying with pandas but had not fully grasped the concepts of series and dataframes.

  • @user-vl4vb5zo1w
    @user-vl4vb5zo1w 3 месяца назад

    I have been using pandas quite a while,learned a lot from your video.
    Your presentation was very good to follow through.
    Thanks for your hard work.

  • @rrio7171
    @rrio7171 8 месяцев назад

    best I found on YT! underrated video, there should be more likes

  • @brandoncyoung
    @brandoncyoung 8 месяцев назад +2

    just getting into DS and kaggleis great the notebook is so easy to use access to datasets is great. thanks for sharing!

    • @robmulla
      @robmulla  8 месяцев назад

      Glad it was helpful!

  • @bashar9200
    @bashar9200 Год назад +1

    Thank you!! I never get tired of your videos!!!

    • @robmulla
      @robmulla  Год назад

      I appreciate you watching them!!

  • @Dongnanjie
    @Dongnanjie 3 месяца назад

    Love it. Thank you Rob!

  • @byte_me_xd-hk5zt
    @byte_me_xd-hk5zt 10 месяцев назад

    your intro i immediately was like you're my hero!

  • @chq012
    @chq012 Год назад

    Wow, great video!
    Very much enjoyed it.
    I will definitely watch your other videos to learn many more techniques.
    Thank you.

  • @JHornsby89
    @JHornsby89 Год назад +3

    Excellent tutorial - Really clear with excellent explanations and concise steps. I've found it useful as a codealonng with a different set of data. Just to get to grasps with Pandas. Thank you!

    • @robmulla
      @robmulla  Год назад +1

      Awesome! So glad you enjoyed and learned from it.

  • @ke30_
    @ke30_ 2 года назад +2

    Your channel is a goldmine ty!

  • @ilyesb2271
    @ilyesb2271 2 года назад +7

    Thank's for everything you share with us

    • @robmulla
      @robmulla  2 года назад +1

      My pleasure! I apprecaite the positive feedback!

  • @kirtwedel9275
    @kirtwedel9275 5 месяцев назад

    Fantastic video! Thanks much for the lesson.

  • @ibowman_UCLA_BRAIN
    @ibowman_UCLA_BRAIN Год назад +2

    This video deserves to be the most liked Gentle Introduction to Pandas Data Analysis on RUclips.

    • @robmulla
      @robmulla  Год назад +2

      Really apprecaite that feedback. Share it with all your friends and maybe we can make it the most liked!

  • @travistexian
    @travistexian 24 дня назад

    Awesome information, plainly stated

  • @uchegodswill-iv4cd
    @uchegodswill-iv4cd 9 месяцев назад

    yes, thanks a lot. l learnt so much. its been interesting and i am going to watch all you videos.

  • @ItsMePeterB
    @ItsMePeterB Месяц назад

    Thank you for the tutorial!

  • @gabrielbiacchi6169
    @gabrielbiacchi6169 9 месяцев назад

    You explain these in a very clear way,! Thank u sir 🙏

  • @davidcrdz1966
    @davidcrdz1966 11 месяцев назад

    First I want to thank you for sharing your skill and time creating these videos. I thought I was doing pretty well until we got to the Columns and rows section...haha I type the same "set_index" as you did but I kept getting an error. I found out I could run "reset_index", then I did "set_index" again and it worked.

  • @dennisalbarello2551
    @dennisalbarello2551 6 месяцев назад

    Great video! Interesting way to make a Pandas Introduction. Thank you a lot to share with us your knowlegde!

  • @wesleyweel8007
    @wesleyweel8007 Год назад +7

    Excellent video, after 2 decades of experience in the software industry I cannot stress more how important it is to have a strong foundation in the basics inorder to attempt something more advanced. Wonderful job

    • @robmulla
      @robmulla  Год назад

      Really appreciate your endorsement! I completely agree about knowing the basics first.

    • @utica2burn
      @utica2burn Год назад

      Interesting comment! I have been using python and pandas for years and thought to myself today I should go back and check the basics - so here I am!
      I find myself still googling every time I have to do simple stuff like change column order or make a copy of a data frame.

  • @BarryPennock
    @BarryPennock 4 месяца назад

    So cool! Pandas for Python makes things so much easier.

  • @AlbertoChillon
    @AlbertoChillon 11 месяцев назад

    Thank you very much, an amazing tutorial!!

  • @zhiyang2553
    @zhiyang2553 10 месяцев назад

    excellent video! amazing introduction! thank you a lot !

  • @betterliving747
    @betterliving747 5 месяцев назад

    One of the best explanations thank you

  • @jakubkopczynski779
    @jakubkopczynski779 Год назад +1

    Thanks for the video, I've learnt a lot! I tried casting different dtypes on the imported Excel spreadsheet columns and found out an interesting issue, when I summed up the numbers in the same column with float64 and int64 dtypes, I got different results (no decimal points involved). Honestly I have no idea why it's working like that! I guess it has to be something with Excel formatting...

  • @andresfrancojunor
    @andresfrancojunor Год назад +2

    That was really good ! Thank you !

    • @robmulla
      @robmulla  Год назад +1

      Glad you found it helpful. Please share it with anyone else you think might also learn from it!

  • @moniquebrasilbaptista1989
    @moniquebrasilbaptista1989 Год назад

    Amazing. Thank you!

  • @laurenceturpin1409
    @laurenceturpin1409 11 месяцев назад

    Thank you for doing the video I learnt a lot about pandas please keep making videos like this.

  • @PaquiCamus
    @PaquiCamus Год назад +1

    I watched the whole video and I am so amazed at how easy is to do data analysis nowadays. I am the generation that used: Lotus to Excel, due to their limitation we needed to combine Statistical Packages(R, SAS), Graphing(Grapher), and 3D surface mapping (Surffer) plus Visual Basic. Now I have decided to learn Python plus others to go back to some old data for recalibration that was impossible deal with due to memory overloading. Panda is very powerful. Thank you very much for sharing your knowledge.

    • @robmulla
      @robmulla  Год назад +1

      Glad the video showed you something new. Pandas is a great skill to master and can be really powerful for doing things that aren’t possible to do in excel with large datasets.

    • @PaquiCamus
      @PaquiCamus Год назад

      @@robmulla Yes, you are right. I am learning it and struggling with Jupyter Notebook and Kagle. I like both. I still have a long way to go!

  • @ArenitaHernandez
    @ArenitaHernandez 10 месяцев назад

    Amazing! Thanks!

  • @CarolinaMunoz-vy3ni
    @CarolinaMunoz-vy3ni Год назад +1

    Although I watched this video a long time ago, I wanted to go over a basic explanation. Thanks for sharing your knowledge.

    • @robmulla
      @robmulla  Год назад +1

      Glad it was helpful!

  • @anirbanc88
    @anirbanc88 Год назад

    this is such a great tutorial, thank you so much!

    • @robmulla
      @robmulla  Год назад +1

      Glad it was helpful! Please share with others who you think might also learn from it.

  • @mohan250s
    @mohan250s Год назад +1

    watching your videos one by one bro, awesome work as usual

    • @robmulla
      @robmulla  Год назад +1

      Thanks a ton, so glad you are learning from them. Make sure to comment and share so the videos get picked up by the youtube algorithm.

  • @100themagician
    @100themagician 11 месяцев назад +1

    Amazing video, thank you Rob

    • @robmulla
      @robmulla  11 месяцев назад

      Thanks for watching. What with a friend!

  • @aditipandey1769
    @aditipandey1769 9 месяцев назад

    Thank you Sir

  • @gospelmoto2833
    @gospelmoto2833 9 месяцев назад

    Got a new sub here. Thanks for your video.

  • @user-mn4me8wv5d
    @user-mn4me8wv5d 5 месяцев назад

    Thanks! So well explained.

    • @robmulla
      @robmulla  5 месяцев назад

      Glad you enjoyed it!

  • @turboblitz4587
    @turboblitz4587 Год назад +1

    Hey I think this is a great tutorial for actual pandas beginners. I have been using pandas for quite some time now, and still learned something. However, an advanced Video would be super great, because I see you doing all sorts of super advanced stuff in your coding videos that blow my mind and that I don't understand! Cheers

    • @robmulla
      @robmulla  Год назад +1

      Thanks for watching. I’m glad you think it’s a good beginners! I need to think through what I could include for an intermediate/advanced tutorial. My pandas noob video has some good examples/tips if you haven’t already checked that out.

    • @turboblitz4587
      @turboblitz4587 Год назад

      @@robmulla Hey thanks :)
      No I think I didnt watch it gonna check it out

    • @turboblitz4587
      @turboblitz4587 Год назад +1

      @@robmulla I checked out the video and yes, I have learned a lot in this one! Also in the timeseries forecasting video. Now I feel like a noob haha

  • @metalflames777
    @metalflames777 3 месяца назад

    21:38
    Wow!! I never knew you could use underscores in place of commas for the larger numbers!

  • @otenyop
    @otenyop 7 месяцев назад

    Wow this was a great video!

  • @swannschilling474
    @swannschilling474 29 дней назад

    Great content!!

  • @wwpharmacist
    @wwpharmacist Год назад +1

    For sure I enjoy this tutorial

  • @davdeveloper
    @davdeveloper 11 месяцев назад

    This video was so useful. Thank you so much!

    • @robmulla
      @robmulla  11 месяцев назад

      You're so welcome! Thanks for watching.

  • @RoadTo10KsubsWithoutAnyVideos
    @RoadTo10KsubsWithoutAnyVideos Год назад

    Very well explained. easily understood . Didn"t have any issues following along. Good job, brother 😀😀

    • @robmulla
      @robmulla  Год назад

      Glad it helped! I apprecaite the feedback.

  • @shahbazsaeed7090
    @shahbazsaeed7090 7 месяцев назад

    please start a series of ML from scratch like linear regression, logistic regression, decision tree, random forest, k means clustering with python please sir please ..... i m really understanding your teaching style as you teach through hands on

  • @AdobadoFantastico
    @AdobadoFantastico Год назад +2

    You're very good at tutorializing.

  • @amitavroydev
    @amitavroydev 6 месяцев назад

    Great video

  • @stifferdoroskevich1809
    @stifferdoroskevich1809 Год назад +1

    Amazing video!!!

    • @robmulla
      @robmulla  Год назад +1

      Glad you liked it!!

  • @pashkinzon
    @pashkinzon 9 месяцев назад +1

    Wonderful video - explanation is nice and clean, very intuitive narrative, thank you!

  • @n.zisanyalvac6538
    @n.zisanyalvac6538 Год назад +2

    thank you! greetings from Turkey :)

    • @robmulla
      @robmulla  Год назад +3

      My pleasure. Glad to know there is someone watching from Turkey!

  • @pkprasads
    @pkprasads 10 месяцев назад +1

    Thank you so much.

    • @robmulla
      @robmulla  10 месяцев назад

      Always welcome!

  • @sandraoriji8351
    @sandraoriji8351 2 года назад +1

    Awesome 👍

    • @robmulla
      @robmulla  2 года назад

      Thanks Sandra! Glad you liked it.

  • @heitorrapela
    @heitorrapela 2 года назад +1

    Good content! 😄

    • @robmulla
      @robmulla  2 года назад +1

      Thanks so much Heitor!

  • @andrewkurian726
    @andrewkurian726 10 месяцев назад

    thank you

  • @antoines8843
    @antoines8843 Год назад

    What is the shortcut you use @27:16 ???
    To copy paste the code while replacing the variable inside?

  • @stylesg7818
    @stylesg7818 Год назад +1

    Thank you

  • @BrutalNewby
    @BrutalNewby 4 месяца назад

    Have a like good man. Gonna watch all of your videos from 0 ;)

  • @boubi9329
    @boubi9329 2 года назад +1

    Hello, I saw one of your post in the youtube forum saying that your Timestamps didn’t worked out properly,
    I see now that it works.
    Did you do anything for it to work, any report sent to youtube ? Did the Timestamp worked after you hit the 1000 subscribers or the problem was there before ?

    • @robmulla
      @robmulla  2 года назад

      Hey! Yes. that was really frustrating. I didn't do anything special. It took a few months but then started working. I hope you get it figured out too.

  • @DiegoSilva-dv9uf
    @DiegoSilva-dv9uf 10 месяцев назад

    Valeu!

  • @madiva45
    @madiva45 6 месяцев назад

    Hello from dom rep next to aiti, how i change the back ground color of kaggle note book .

  • @NAC79
    @NAC79 2 года назад +2

    Going on 1 full week of trying to change the font between Jupyter now Kaggle. Idk why I'm obsessed with it

    • @robmulla
      @robmulla  2 года назад

      Did you figure it out? Have you watched my tutorial about jupyter/python notebooks?

    • @NAC79
      @NAC79 2 года назад +1

      @@robmulla I have not. Adding it to the que now. Thanks!

  • @thechristan019
    @thechristan019 6 месяцев назад

    Hi folks
    Does anyone know what keyboard he is using?
    Thanks in advance

  • @vaporr5929
    @vaporr5929 Год назад +2

    At minute 12:40, I believe you meant first "5 rows" and *not* first "5 columns"

    • @robmulla
      @robmulla  Год назад

      Ah! Good catch. Maybe I did it on purpose to make sure you were paying attention 😏

    • @vaporr5929
      @vaporr5929 Год назад +1

      @@robmulla I truly appreciate the learning content you provide to the masses on your channel. Looking forward to more tutorials on Pandas, liked and subscribed!

  • @annikaw5068
    @annikaw5068 Год назад +1

    yass

    • @robmulla
      @robmulla  Год назад +1

      😉

    • @annikaw5068
      @annikaw5068 Год назад +1

      @@robmulla You just gained a new subscriber✅😊

  • @wiscgaloot
    @wiscgaloot Год назад +1

    For the last few weeks I've been struggling to learn how to do with Python what I do in 10 minutes with Excel. And a few months ago I spent half a day figuring out most of the steps to do the same analysis in Matlab. Dataframes are ridiculously difficult to deal with I'm learning it because several colleagues said that if I'm looking for a new systems engineering job, I should know Python. Numpy is easy. Pandas dataframes are obscure and clunky.

    • @robmulla
      @robmulla  Год назад +1

      Interesting to hear you actually find numpy easier to work with than dataframes. I find the opposite because dataframes have an index and column names. It might just take some time and then it will click for you, or maybe you will find something else that works better for your use case. Hope the video was helpful and good luck on your journey.

  • @terenceochuo701
    @terenceochuo701 8 месяцев назад

    Getting errors while reading csv file

  • @filmssharecenter3293
    @filmssharecenter3293 Месяц назад

    great

  • @marlowisws
    @marlowisws Год назад +1

    Would be helpful to mention Tab kicks off the auto-complete for us n00bs

    • @robmulla
      @robmulla  Год назад

      Good point. Also shift-tab for docstrings!

  • @caiyu538
    @caiyu538 Год назад +1

    thumb up. Thumb up

  • @speedyg2295
    @speedyg2295 Год назад +1

    What is I have an Excel or csv that has 999 rows but I want to delete 101 thru 999 rows? or Just read the first 100 rows only. Then save that as a new DataFrame as only those 100 rows.

    • @robmulla
      @robmulla  Год назад

      .head(100) will give you just the first 100 rows.

    • @speedyg2295
      @speedyg2295 Год назад

      @@robmulla Thanks for the info

  • @jonesPossibly
    @jonesPossibly Год назад +1

    Hi - why is the series of 'thing' in mydf dataframe an object dtype, but the 'count' is an int64 dtype? Why is 'thing' not a 'string' dtype?

    • @robmulla
      @robmulla  Год назад

      I'm not sure, if "thing" is a string it will show as "object" if you count on it it will produce a number integer.. but I'm not sure exactly what you are asking.

    • @jonesPossibly
      @jonesPossibly Год назад

      @@robmulla hiya - thanks for the reply - at ruclips.net/video/_Eb0utIRdkw/видео.html
      you can see that the series containing stings has a dtype of object, whereas the series containing the integers has a dtype of int64. I was just wondering why its object and not string?

  • @ghrangelr
    @ghrangelr 2 года назад +1

    Hello, What key do you use to open the menus?

    • @robmulla
      @robmulla  2 года назад +1

      Which menu is that? You might want to check out my video on jupyter notebooks when I talk about the keyboard shortcuts I often use.

  • @nikunjgorani8964
    @nikunjgorani8964 10 месяцев назад

    i cant convert the dtype of likeCount into int64 Can some1 hlp me

  • @CarolinaMunoz-vy3ni
    @CarolinaMunoz-vy3ni Год назад +1

    Hello Rob, Can you help me with this error, please? I can't figure out what i did wrong. Thanks a lot :)
    df['likeCount'] = pd.to_numeric(df['likeCount'].astype('str'))
    TypeError: 'Series' object is not callable

    • @robmulla
      @robmulla  Год назад +1

      Strange. Don’t know why it isn’t working. Do you need to set the type to string? Try just dunking to numeric on the column without astype(‘str’)

    • @CarolinaMunoz-vy3ni
      @CarolinaMunoz-vy3ni Год назад +1

      @@robmulla Sorry again, I have a question, one more time. What is the best way to work with numbers with decimals, for example, I have a field that has decimal numbers, but I want to convert it to an int.

  • @NAC79
    @NAC79 2 года назад +1

    How many years have you been doing Data Science?

    • @robmulla
      @robmulla  2 года назад +1

      Thanks for asking. I've been working with data for over 10 years but doing data science specifically for about 6.

  • @ericbroun4657
    @ericbroun4657 Год назад

  • @obayram4615
    @obayram4615 Год назад +1

    Very good 🙂👋👋👋👋👋👋😋

  • @txreal2
    @txreal2 Год назад +1

    Can I use Google Colab to follow along also?

    • @robmulla
      @robmulla  Год назад +1

      Yes! It's actually really easy. Just click the three dots in the top right corner of the kaggle notebook and then click "download code" you then can open it in google colab. You would also need to download and link the data. Why do you prefer colab over a kaggle notebook? They are very similar.

  • @nakul469
    @nakul469 2 месяца назад

    29:20 - it is giving me value error

  • @punamjadhav7801
    @punamjadhav7801 9 месяцев назад

    Dataframe 1 / Table 1
    MaterialID |Unit Selling Price |Unit Cost
    A | 100 | 80
    B | 200 | 140
    C | 150 | 100
    D | 250 | 230
    E | 225 | 215
    Dataframe 2 / Table 2
    Month | Quantity Sold | Material ID
    Jan | 10 | A
    Feb | 5 | E
    Mar | 25 | C
    Jan | 5 | D
    Feb | 15 | B
    Mar | 2 | A
    Which month highest total sale amount achieved
    Which month highest profit amount observed
    Change Quantity Sold from 5 to 7 programatically and find out revised
    Which month highest total sale amount achieved
    Which month highest profit amount observed

  • @felixakwerh5189
    @felixakwerh5189 Год назад +1

    do you have a discord channel??

    • @robmulla
      @robmulla  Год назад +1

      Yes I do! Join! discord.gg/KnsDbstv

  • @average-jojo-enjoyer
    @average-jojo-enjoyer Год назад +1

    My time stamps still not working -_-

    • @robmulla
      @robmulla  Год назад

      Oh man. I’m sorry. That was really frustrating when it happened to me.

  • @abhishekrai1060
    @abhishekrai1060 Год назад +1

    Don't use twitch. Will subscribe you here though

  • @samarumugam4833
    @samarumugam4833 8 месяцев назад

    Hi Rob why are addressing Hey u tube ,seems to be quite odd or some sort , mind you U tube is not watching yours Videos we guys are watching our Likes and Views makes your day worth while , So Gentle request be direct to source please address us by " Hi guys " or something .. 🙏🙏🤞Any way Great Videos by You bro. Keep it Up. God Bless You...

  • @CarolinaMunoz-vy3ni
    @CarolinaMunoz-vy3ni 2 года назад +1

    Hello Rob, i followed your tutorial and i had an error when you created a new columns. Can you help me with this error. Thank you very much for the great job. /opt/conda/lib/python3.7/site-packages/ipykernel_launcher.py:1: SettingWithCopyWarning:
    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead

    • @robmulla
      @robmulla  2 года назад

      Hey Carolina. This message usually comes up when you are trying to edit a subset of a previously defined dataframe. The best fix is to add `.copy()` after subsetting and renaming a dataframe.
      So before you might have:
      df_small = df.query('thing > 10')
      Change to:
      df_small = df.query('thing > 10').copy()

    • @nikunjgorani8964
      @nikunjgorani8964 10 месяцев назад

      @@robmulla Hey Rob I am getting this error during converting the likecount into integer IntCastingNaNError Traceback (most recent call last)
      Cell In[126], line 2
      1 df['viewCount'].astype('int')
      ----> 2 df['likeCount'] = df['likeCount'].astype('int').copy()