Let's now move on to building our model:
- First, we want to look at the dimensions of the dataset and the data using the shape and head() functions. We also take a look at the statistics of the numeric variables using describe():
df_backorder.shapedf_backorder.head()df_backorder.describe()
If you get your output in scientific notation, you can change to view it in standard form instead by executing the following command: pd.options.display.float_format = ‘{:.2f}’.format
- With dtypes, we get to see the data types of each of the variables:
df_backorder.dtypes
- We can see that sku is an identifier and will be of no use to us for our model-building exercise. We will, therefore, drop sku from our DataFrame as follows:
df_backorder.drop('sku', ...