liveBook · Manning

Pandas

As explained in Fight Fraud with Machine Learning

pandas is a Python library for data manipulation and analysis, especially with labeled tabular data.

pandas is a Python library for manipulating and analyzing labeled tabular data. In fraud analysis, it loads CSV records into a DataFrame and supports rapid inspection before rules or models are built. section 2.1

A practical inspection workflow uses pandas to:

  • Load phishing records with `pd.read_csv(...)`. section 2.1
  • Preview records with `df.head(10)`. section 2.1
  • Check dimensions with `df.shape` and summarize columns with `df.describe(include="all")`. section 2.1
  • Inspect column types with `df.dtypes` and identify binary features for rule-based analysis. section 2.1

Inspecting a phishing dataset

A 10,000-row, 50-column phishing dataset can be loaded into `df`, previewed, sized, summarized, and checked for data types. Its `CLASS_LABEL` column marks genuine webpages with 0 and fraudulent webpages with 1. section 2.1

import pandas as pd
df = pd.read_csv("./phishing_dataset.csv")

Open the runnable pandas loading example for the phishing CSV and DataFrame setup. section 2.1

How Fight Fraud with Machine Learning covers it

How deep it goes
Demonstrates loading, previewing, sizing, summarizing, typing, and binary-feature inspection, without covering pandas internals.
Examples
Uses a phishing webpage dataset with 10,000 rows, 50 columns, numerical features, and a binary fraud label.
What it assumes
Assumes basic Python and notebook use while demonstrating tabular inspection from the dataset upward.
What you can do after
Apply it via pandas to load a fraud CSV and inspect its dimensions, statistics, types, features, and labels.
How it connects
Connects Python, CSV files, DataFrames, Jupyter notebooks, feature extraction, and rule-based fraud detection.

Also explained in

Compare how 14 books explain pandas →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fight Fraud with Machine Learning. The section links point to the parts of the book it draws on.