Transforming data
Data transformation is the process of converting data from one format (master format) into another (target format) based on defined steps/processes. Data transformation can be simple or complex, depending on the structure, format, end goal, size, or complexity of the dataset, and as such, it is important to know the features that are available in Danfo.js for doing these transformations.
In this section, we'll introduce some features available in Danfo.js for doing data transformation. Under each sub-section, we'll introduce a couple of functions, including fillna
, drop_duplicates
, map
, addColumns
, apply
, query
, and sample
, as well as functions for encoding data.
Replacing missing values
Many datasets come with missing values and in order to get the most out of these datasets, we must do some form of data filling/replacement. Danfo.js provides a fillna
method that, when given a DataFrame or Series, can automatically fill any missing field with...