Daniel Chen: Cleaning and Tidying Data in Pandas | PyData DC 2018

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • PyData DC 2018
    Most of your time is going to involve processing/cleaning/munging data. How do you know your data is clean? Sometimes you know what you need beforehand, but other times you don't. We'll cover the basics of looking at your data and getting started with the Pandas Python library, and then focus on how to "tidy" and reshape data. We'll finish with applying customized processing functions on our data.
    ===
    www.pydata.org
    PyData is an educational program of NumFOCUS, a 501(c)3 non-profit organization in the United States. PyData provides a forum for the international community of users and developers of data analysis tools to share ideas and learn from each other. The global PyData network promotes discussion of best practices, new approaches, and emerging technologies for data management, processing, analytics, and visualization. PyData communities approach data science using many languages, including (but not limited to) Python, Julia, and R.
    PyData conferences aim to be accessible and community-driven, with novice to advanced level presentations. PyData tutorials and talks bring attendees the latest project features along with cutting-edge use cases.
    0:00 Introduction
    0:18 Setup: Github Repo, Jupyter Setup
    5:35 Loading Datasets - panda.read_csv()
    7:43 Dataset / Dataframe At A Glance
    7:53 Get First Rows: df.head()
    8:58 Get Columns: df.columns
    9:15 Get Index: df.index
    9:37 Get Body: df.values
    10:46 Get Shape: df.shape
    12:04 Get Summarizing Statistics: df.info()
    13:12 Filtering, Slicing a Dataset / Dataframe
    13:25 Extract a Single Column: df['col_name']
    14:12 Dataframe vs Series
    14:41 Extract N Columns: df[['col1_name', 'col2_name']]
    15:51 Panda's Version: df.version
    16:26 Extract Rows: df.iloc
    17:30 Extract Rows: df.loc vs df.iloc vs df.idx
    18:45 Extract Rows: df.iloc
    19:37 Extract Rows: df.ix - Deprecated
    20:38 Extract Multiple Rows and Columns
    22:00 Extract Rows using Boolean Subsetting
    23:24 Extract Rows using Multiple Boolean Subsetting
    24:55 Cleaning a Dataset / Dataframe
    25:38 General Issues according to a "Tidy Data" Research Paper
    29:45 Issue 1: Column Headers are Values and not Variables Names
    30:19 Load Pew Dataset
    32:55 Transform Columns into Rows: pd.melt()
    36:59 Load Billboard Dataset
    37:05 Transform Columns into Rows: pd.melt()
    42:00 Issue 2: Multiple Variables are Stored in 1 Column
    43:06 Load Ebola Dataset
    46:22 Transform Columns into Rows: pd.melt()
    47:14 Split Column using String Manipulation through Accessors
    51:19 Extract Column / Series from Accessor Split: accessor.get()
    53:13 Add Column to Dataframe
    54:13 Contracted Form for pd.melt() and Accessor String Manipulation: pd.merge()
    56:10 Issue 3: Variables Stored in Rows And Columns
    56:25 Load Weather Dataset
    58:30 Transform Columns into Rows: pd.melt()
    1:1:00 Transform Rows into Columns
    1:2:00 Transform Rows into Columns: pd.pivot() vs pd.pivot_table()
    1:4:30 Transform Rows into Columns: pd.pivot_table()
    1:6:19 Flatten nested / hierarchical table: pd.reset_index()
    1:7:42 Issue 4: Multiple Types of Observational Unit in Same Table (i.e De-nomalized Table)
    1:9:43 Extract Type Observational Unit in new Dataframe, Drop Duplicates
    1:11:30 Create "key" for extracted observational unit dataframe
    1:12:11 Save new dataframe: pd.to_csv()
    1:13:22 Merge / Join dataframe on common columns
    1:16:25 Randomly Sample a dataframe
    1:17:15 Note on Memory Consumption between all 3 dataframes
    01:18:25 Summary from "Tidy Data" Research Paper
    01:20:06 Q&A
    01:21:21 Q&A 1: Simulating R's Chaining in Python
    01:24:49 Q&A 2: Best Practices on Braquet Notation vs Chaining
    Huge s/o to github.com/KMurphs for the video timestamps!
    Want to help add timestamps to our CZcams videos to help with discoverability? Find out more here: github.com/numfocus/CZcamsVi...
  • Věda a technologie

Komentáře • 56

  • @mohitupadhayay1439
    @mohitupadhayay1439 Před 2 lety +16

    Time stamps :
    32: 57 : Melt function for Transposing columns and Rows.
    42:17 : Handling multiple variables
    48 :11 : Split Function
    56: 20 : Variables stored in both Rows-Columns.
    1:01:10 : Pandas Pivot table
    1:06:11 : Reset_index() function
    1:10:23 : Drop duplicates function

  • @ediray2010
    @ediray2010 Před 2 lety +7

    This is the single most helpful python pandas tutorial that I've ever seen. Thank you Daniel Chen. Great job!

  • @matosleni
    @matosleni Před 2 lety +3

    Excellent lecture! Thanks for letting it public!

  • @empr1ze
    @empr1ze Před 2 lety

    Great video, that gets to the point and explains complex concepts so elegantly.

  • @tabaicanking3701
    @tabaicanking3701 Před 2 lety

    One of the best data cleanih and tidying tutorial on CZcams

  • @gagandhaliwal40
    @gagandhaliwal40 Před 2 lety +4

    Well explained and easy to understand . I appreciate your help so much. Many thanks

  • @OliverShey
    @OliverShey Před 2 lety +8

    This is such a wonderful tutorial.

  • @sergioluis6977
    @sergioluis6977 Před rokem +1

    Simple and easy to follow. Completely new Python student and this was such a great introduction, eager to continue learning! Thanks a lot Daniel

  • @marcmarc172
    @marcmarc172 Před rokem

    Those timestamps were well made and very helpful - thank you!

  • @blessingogbeh4778
    @blessingogbeh4778 Před 2 lety

    I'm just 10 mins in and I already love you. Thank you for this presentation

  • @iliasdimadis2975
    @iliasdimadis2975 Před 2 lety +1

    Great presentation! Thank you very much for this helpfull and understandable-easy to follow Tutorial.

  • @lucasmunkombwe4444
    @lucasmunkombwe4444 Před 2 lety +1

    Great tutorial for beginners like me. Thank you

  • @adamrosariorodriguez
    @adamrosariorodriguez Před 2 lety +1

    A great tutorial. Thanks!

  • @kaluemeka4194
    @kaluemeka4194 Před 2 lety

    Very excellent and explanatory in detail

  • @vinuvish
    @vinuvish Před 2 lety

    Thanks for the video. I started with pandas and got confused with the brackets, it is clear now.

  • @asankacool1
    @asankacool1 Před 2 lety

    Awesome explanation and super content @Daniel !

  • @kennethstephani692
    @kennethstephani692 Před 11 měsíci

    This is a terrific video, Daniel. Thank you very much!!

  • @yassaryelurkar3631
    @yassaryelurkar3631 Před 2 lety

    Great video. Underrated, isn't recommended by youtube. Btw thanks for the video.

  • @marinagrabelli8623
    @marinagrabelli8623 Před 2 lety +1

    So useful, thanks.

  • @luisfelipeperezherrera5887

    it was very useful, thank you so much

  • @13kriztian
    @13kriztian Před 2 lety

    Excellent tutorial

  • @MouradBENKADOUR
    @MouradBENKADOUR Před 2 lety

    Excellent Tutorial about pandas and Data Cleansing and Data preparation

  • @omprakashreddy4230
    @omprakashreddy4230 Před 2 lety

    simply wow !!

  • @Sagaofsr
    @Sagaofsr Před 2 lety

    Great tutorial

  • @michaelhaag3367
    @michaelhaag3367 Před 2 lety +1

    Very nice talk, I finally got it. Seems like a nice dude also

  • @sustainability.s
    @sustainability.s Před 2 lety

    Excellent really learnt a lot 👍👍👍

  • @kishorekumar6815
    @kishorekumar6815 Před 2 lety

    great tutorial

  • @lucianlackman8103
    @lucianlackman8103 Před rokem

    Amazing tutorial thanks man

  • @sandraoriji8351
    @sandraoriji8351 Před 2 lety

    Awesome 👍

  • @olabisifayose7386
    @olabisifayose7386 Před rokem

    Thank you. Very Very helpful

  • @danielpaul65
    @danielpaul65 Před 11 měsíci

    Good skills I've learnt here

  • @jongcheulkim7284
    @jongcheulkim7284 Před 2 lety

    Thank you^^

  • @zeadzead7237
    @zeadzead7237 Před 2 lety +1

    جميل جدا ورائع جدا ورائع جدا

  • @bryancapulong147
    @bryancapulong147 Před 2 lety

    Thank you

  • @arshad1781
    @arshad1781 Před 2 lety

    Thanks you 😊

  • @sadhnarai8757
    @sadhnarai8757 Před 2 lety

    Ver good Aman

  • @gbengakolawole403
    @gbengakolawole403 Před rokem

    A bit lengthy but worth it. Lots of good stuff in it.

  • @redserpent
    @redserpent Před 2 lety +1

    where is the URL to download the data? I missed it somehow. Thank you.

  • @pritomroy2465
    @pritomroy2465 Před 2 lety

    Newly starting Python. I realize that Data Manipulation is Far easier in R (Use tidyvarse)!!

  • @HellenofTroy897
    @HellenofTroy897 Před rokem

    But how do you melt all the other columns in the pew dataset? You just demonstrated the

  • @mustajab1767
    @mustajab1767 Před rokem

    hey guys where can I find the relevant datasets from the tutorial.
    somebody please let me know
    (TIA)

  • @OyinkanChekwas
    @OyinkanChekwas Před 2 lety

    Hello, please how do we get the datasets you used in the video? Could you share a link we could download from? Thanks.

    • @afonsoosorio2099
      @afonsoosorio2099 Před 2 lety

      @KKC, Sir, right at the beginning, 0:04:00 to 0:40:00, datasets to be found at repository github, the link is there.

  • @ajiboroibrahim6845
    @ajiboroibrahim6845 Před rokem

    Thanks for the timestamps but
    @ 16:26 it's df.loc not df.iloc

  • @user-pg8tk9ze9g
    @user-pg8tk9ze9g Před 2 měsíci

    I feel like Daniel and Leonard's characters in The Big Bang Theory have a lot of similarities. Did anyone else notice that?

  • @somethingness
    @somethingness Před rokem

    This is the first time I've understood why melt is called melt. 32:36

  • @geneee
    @geneee Před rokem

    so somehow, problems 1 to 3 contradicts problem 4 and 5?

  • @emisarangae125
    @emisarangae125 Před rokem

    looks like the url for the data has been removed. I also can't find it in github

  • @krishnavhatkar4729
    @krishnavhatkar4729 Před rokem

    from where i can get the dataset

  • @FailingProject185
    @FailingProject185 Před 4 měsíci

    could someone post the link to github repo?

  • @salimkaplan464
    @salimkaplan464 Před rokem

    Hadley Wickham'ın askerleriyiz.

  • @yeahgoood
    @yeahgoood Před 2 lety

    5:24 to skip all the pointless nerd BABBLING.

    • @empr1ze
      @empr1ze Před 2 lety +1

      That's why you're still an underling.

  • @pavanpandya9080
    @pavanpandya9080 Před 2 lety

    Excellent tutorial