flâneur — a map of the web's best reading

12 Tidy data | Python for Data Science

byuidatascience.github.io · 4,922 words · saved by 1 readers

In this chapter, you will learn a consistent way to organise your data in Python, an organisation called tidy data. Getting your data into this format requires some upfront work, but that work pays off in the long term. Once you have tidy data and pandas data frames, you will spend much less time munging data from one representation to another, allowing you to spend more time on the analytic questions at hand. This chapter will give you a practical introduction to tidy data and the accompanying tools in the pandas package. If you’d like to learn more about the underlying theory, you might enjoy the Tidy Data article published in the Journal of Statistical Software. In this chapter we’ll focus on pandas, a package that provides a bunch of tools to help tidy up your messy datasets. You can represent the same underlying data in multiple ways. The example below shows the same data organised in four different ways. Each dataset shows the same values of four variables country, year, populati

12 Tidy data | Python for Data Science Python for Data Science 12 Tidy data 12.1 Introduction “Happy families are all alike; every unhappy family is unhappy in its own way.” –– Leo Tolstoy “Tidy datasets are all alike, but every messy dataset is messy in its own way.” –– Hadley Wickham In this chapter, you will learn a consistent way to organise your data in Python, an organisation called tidy data . Getting your data into this format requires some upfront work, but that work pays off in the long term. Once you have tidy data and pandas data frames, you will spend much less time munging data f

Explore this link on the map →

saved by

related reading