Reshaping Data with pandas
Reshape DataFrames from a wide to long format, stack and unstack rows and columns, and wrangle multi-index DataFrames.
Kurs Kostenlos Starten4 Stunden15 Videos52 Übungen17.777 LernendeLeistungsnachweis
Kostenloses Konto erstellen
oder
Durch Klick auf die Schaltfläche akzeptierst du unsere Nutzungsbedingungen, unsere Datenschutzrichtlinie und die Speicherung deiner Daten in den USA.Trainierst du 2 oder mehr?
Versuchen DataCamp for BusinessBeliebt bei Lernenden in Tausenden Unternehmen
Kursbeschreibung
Often data is in a human-readable format, but it’s not suitable for data analysis. This is where pandas can help—it’s a powerful tool for reshaping DataFrames into different formats. In this course, you’ll grow your data scientist and analyst skills as you learn how to wrangle string columns and nested data contained in a DataFrame. You’ll work with real-world data, including FIFA player ratings, book reviews, and churn analysis data, as you learn how to reshape a DataFrame from wide to long format, stack and unstack rows and columns, and get descriptive statistics of a multi-index DataFrame.
Trainierst du 2 oder mehr?
Verschaffen Sie Ihrem Team Zugriff auf die vollständige DataCamp-Plattform, einschließlich aller Funktionen.In den folgenden Tracks
Datenmanipulation mit Python
Gehe zu TrackDaten importieren und bereinigen mit Python
Gehe zu Track- 1
Introduction to Data Reshaping
KostenlosLet's start by understanding the concept of wide and long formats and the advantages of using each of them. You’ll then learn how to pivot data from long to a wide format, and get summary statistics from a large DataFrame.
Wide and long data formats50 xpThe long and the wide100 xpFlipping players100 xpReshaping using pivot method50 xpDribbling the pivot method100 xpOffensive or defensive player?100 xpReplay that last move!100 xpPivot tables50 xpReviewing the moves100 xpExploring the big match100 xpThe tallest and the heaviest100 xp - 2
Converting Between Wide and Long Format
Master the technique of reshaping DataFrames from wide to long format. In this chapter, you'll learn how to use the melting method and wide to long function before discovering how to handle string columns by concatenating or splitting them.
Reshaping with melt50 xpGothic times100 xpRating is not everything100 xpHow is Frankenstein, Dorian Gray?100 xpWide to long function50 xpThe golden age100 xpDecrypting the code100 xpTime to read, Katniss!100 xpWorking with string columns50 xpDid you say dystopia?100 xpWhat's your rating, Harry?100 xpElementary, dear Watson!100 xp - 3
Stacking and Unstacking DataFrames
In this chapter, you’ll level-up your data manipulation skills using multi-level indexing. You'll learn how to reshape DataFrames by rearranging levels of the row indexes to the column axis, or vice versa. You'll also gain the skills you need to handle missing data generated in the stacking and unstacking processes.
Stacking DataFrames50 xpStack the calls!100 xpPhone directory index100 xpText me!100 xpUnstacking DataFrames50 xpInternational caller100 xpCall another time100 xpOrganizing your voicemail100 xpWorking with multiple levels50 xpSwap your SIM card100 xpTwo many calls100 xpHandling missing data50 xpA missed phone call100 xpDon't drop the stack100 xp - 4
Advanced Reshaping
You'll finish by learning how to combine the reshaping process with grouping to produce quick data manipulations. Lastly, you'll discover how to transform list-like columns and handle complex nested data, such as nested JSON files.
Reshaping and combining data50 xpLess fast food, please!100 xpOnly going up100 xpA group analysis100 xpTransforming a list-like column50 xpMerge it all100 xpExplode the bounds100 xpThe good old split100 xpReading nested data into a DataFrame50 xpNested movies100 xpA complex film100 xpDealing with nested data columns50 xpUn-nesting birds100 xpDon't dump the bird100 xpThe final reshape50 xp
Trainierst du 2 oder mehr?
Verschaffen Sie Ihrem Team Zugriff auf die vollständige DataCamp-Plattform, einschließlich aller Funktionen.In den folgenden Tracks
Datenmanipulation mit Python
Gehe zu TrackDaten importieren und bereinigen mit Python
Gehe zu TrackMitwirkende
Voraussetzungen
Data Manipulation with pandasMaria Eugenia Inzaugarat
Mehr AnzeigenData Scientist and Artificial Intelligence Consultant
Was sagen andere Lernende?
Melden Sie sich an 15 Millionen Lernende und starten Sie Reshaping Data with pandas Heute!
Kostenloses Konto erstellen
oder
Durch Klick auf die Schaltfläche akzeptierst du unsere Nutzungsbedingungen, unsere Datenschutzrichtlinie und die Speicherung deiner Daten in den USA.