Tidy data
Last updated
Was this helpful?
Last updated
Was this helpful?
We have lots and lots of data at our disposal. But data is the first step in translating data into meaningful information. This translation we can be done by analysis and visualisation of the data. There are many tools developed for data analysis in python. Statistical tools, Visualisation tools as well as Machine learning tools. Most of these tools need a tidy data. The principles of tidy data provide a standard way to organise data values within a dataset. A standard makes initial data cleaning easier because you don’t need to start from scratch and reinvent the wheel every time. The tidy data standard has been designed to facilitate initial exploration and analysis of the data, and to simplify the development of data analysis tools that work well together[1]
The principles are as follow:
Each variable must have its own column
Each observation must have its own row
Each value must have its own cell
[1] Source: R for Data Science, Hadley Wickham & Garrett Grolemund, CC-BY-NC-ND 3.0 US, https://r4ds.had.co.nz/tidy-data.html
The tidy principles lead to a table, we call DataFrame
. The library pandas
support organising data in dataframes. A DataFrame is a collection of columns, each of which represent a variable. Each column can have a different value type (numeric, strings, booleans etc). DataFrames are like matrixes. They can be slides by column and row index.