Course Content
Spam Classification Project: Identifying Email Threats
Spam Classification Project: Identifying Email Threats
Import Data
read_csv()
is a function in the Python pandas
library that is used to import data from a CSV (Comma Separated Values) file into a pandas
DataFrame. The function takes in the file path or file object of the csv file as its first argument, and additional parameters can be passed in to specify things like column names, the delimiter used in the file, whether the first row should be treated as a header, and more. The function returns a DataFrame containing the data from the csv file.
Task
- Import
pandas
aspd
; - Read in the csv file;
- Print the first 5 rows of the dataset;
- Print the info of the dataset.
Everything was clear?
Section 1. Chapter 2
Start learning today and achieve
coding mastery
- Master Python, SQL, JavaScript & more.
- Learn with Step-by-Step Lessons.
- Get Ready for Real-World Projects.
- Earn a Certificate Upon Completion.