Menu

Loading the Dataset

Lesson 2: Loading the Dataset

Once the dataset files are extracted and available, the next step is to load the CSV file into a Pandas DataFrame. Pandas is used because it provides powerful tools for handling structured data, making it easier to clean, analyze, and prepare the dataset for machine learning.

At this stage, no transformations are performed. The goal is simply to import the required libraries and load the dataset correctly into Python.

Code:

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

#Load CSV file

df = pd.read_csv("/content/WA_Fn-UseC_-Telco-Customer-Churn.csv")

The dataset is now stored in the DataFrame named df. This DataFrame contains customer demographic details, service subscriptions, billing information, and churn status, which will be used for further analysis and model building.