1. NumPy Essentials
NumPy is the foundational library for numerical computing in Python, and it revolves around the ndarray object. Arrays can be created from existing Python lists using np.array([1,...
Read full chapter →The essential Python for Data Science cheat sheet: 7 concise chapters you can read in minutes, distilled from the full deck. When you're ready, drill the flashcards or test yourself under exam conditions.
NumPy is the foundational library for numerical computing in Python, and it revolves around the ndarray object. Arrays can be created from existing Python lists using np.array([1,...
Read full chapter →Pandas builds on NumPy to provide labeled, tabular data structures ideal for data analysis. The primary object is the DataFrame, which can be created directly from a dictionary suc...
Read full chapter →Real-world data is messy, and Pandas offers a rich toolkit for cleaning it. Duplicate rows can be flagged with df.duplicated(), which returns a boolean Series marking every row aft...
Read full chapter →Matplotlib is the workhorse plotting library underlying most Python visualization. A basic line plot is created with plt.plot(x, y) followed by plt.show(). Before displaying, you c...
Read full chapter →Group-based aggregation is central to data analysis, and Pandas implements the familiar split-apply-combine pattern through groupby. The expression df.groupby('category')['value']....
Read full chapter →Before feeding data to machine-learning models, raw columns usually need to be transformed into more informative features. The simplest step is creating new columns through vectori...
Read full chapter →Before any serious analysis, you need a quick overview of a DataFrame. df.shape returns a tuple of (rows, columns), df.head(10) shows the first ten rows, and df.dtypes lists the da...
Read full chapter →Done reading?
Test yourself with the Python for Data Science practice exam — timed questions, instant score, full review of wrong answers. Free.
🎯 Take the Practice Exam →