Before starting with data analysis through multiple linear regression, we conduct an exploratory analysis to understand how the data is distributed and extract preliminary knowledge:
To display the first 20 rows of the DataFrame that have been imported, we can use the head() function, as follows:
print(data.head(20))
The following results are returned:
The head() function, with no arguments, gets the first five rows of data from the DataFrame.
Now, the dataset is available in our Python environment. To extract further information, we can invoke the info() function, as follows:
print(data.info())
Theprint()method prints ...