I am new to Data-preprocessing in Python for Machine Learning. I am trying to preprocess some data. The data consists of many categorical variables with some empty and NaN entries. I am doing filling the empty or NaN spaces using ffil method, then doing label-encode using sklearn LabelEncoder and later one-hot encoding. I have two different codes segments. The first one is little simpler where doing label encoding gives no error but in the second case which has few addintional processes I am getting the above-mentioned error: The first code section:I am new to Data-preprocessing in Python for Ma