Machine learning models require all input and output
variables to be numeric. This means that the data contains categorical data,
must encode it to numbers before it fit and evaluate a model. Encoding is a required pre-processing step
when working with categorical data for machine learning . Encoding removes redundancies from data, the size of files will
be a lot smaller. This results in faster input speed when data is saved. Since
encoded data is smaller in size it saves space on storage devices. so encode is important.