Menu

Exploring the Dataset

Exploring the Dataset

Before preprocessing the data, it is important to examine the dataset and understand its structure. Exploring the dataset helps verify that the data has been loaded correctly and provides an overview of the available features.

Code

news.head()

news.shape

news.info()

Explanation

  • head() displays the first five news articles.
  • shape returns the number of rows and columns.
  • info() displays information such as column names, data types, and missing values.

Output

The dataset structure and summary information are displayed successfully.