Skip to main content

30 docs tagged with "Python"

Python language notes.

View all tags

Arrays and Attributes

Creating ndarrays, the six shape attributes, dtypes, and why an array is not a list.

Choosing a Chart

Every chart type answers one specific question — pick the chart by starting from the question.

Cleaning Data

Filling and dropping missing values, removing duplicates, and converting types back after the fix.

Conditional Statements

if, if/else, if/elif/else, nested conditions, and the logical operators that combine them.

Correlation and Covariance

Measuring whether two variables move together — the correlation scale, why covariance can't be compared, and what correlation misses.

Data Types

Python's four scalar and four collection types—int, float, str, bool, list, tuple, dict, set—mutability, ordering, and hashability.

Descriptive Statistics

Mean, median, mode, range, variance, standard deviation and quartiles — what each one tells you and when it misleads.

Dictionaries and Sets

Key/value lookup with dict, uniqueness and set algebra with set, and why keys must be immutable.

Expressions and Operators

Arithmetic operators, strict float division, right-to-left exponentiation, PEMDAS precedence, and structuring computations.

F-Strings

Formatted string literals, precision specifiers, alignment padding, conversion flags, and debug mode.

Fundamentals of AI

Foundations of Artificial Intelligence — programming basics, numerical computing with NumPy, data manipulation, and visualization.

Input and Output

User input streams via input(), why input always returns a string, and custom print formatting with sep and end parameters.

Inspecting Data

head, tail, shape, dtypes, info and describe — the first six things to run on any new DataFrame.

Lists

The mutable sequence — methods that change it in place, sort vs sorted, the reference trap, and comprehensions.

Loops

for and while loops, range(), break and continue, the loop else clause, and nested loops.

Matplotlib

Line, bar, histogram, scatter and pie charts with pyplot — plus figure, show and savefig.

Operations and Broadcasting

Element-wise arithmetic, the broadcasting rules, universal functions, matrix multiplication, sorting and stacking.

Plotly

Interactive charts with plotly.express — hover, zoom and pan, plus bubble charts and how to export.

Seaborn

Statistical charts in one line — bar, count, histogram, scatter, box, violin, heatmap and pair plot.

Series and DataFrames

The two pandas structures — a labelled 1-D Series and a 2-D DataFrame — and how the index changes everything.

Strings and Slicing

Indexing, the three-part slice, immutability, and the string methods worth knowing.

Tuples

The immutable sequence — the trailing-comma rule, shallow immutability, unpacking, and when a tuple beats a list.

Values and Types

Every Python value carries its type. How to inspect types, understand memory references, and navigate casting and truthiness traps.

Variables and Naming

What makes a Python identifier legal, the 35 reserved keywords, the danger of shadowing built-ins, and PEP 8 conventions.