
Explore NumPy, the foundational Python package for numerical computing, with fast vectorized array operations, broadcasting, linear algebra, and essential tools for data analysis.
Explore numpy ndarrays, creating and manipulating arrays for batch computations in Python, including random data generation, elementwise operations, and inspecting shape and float64 dtype.
Explore how ndarrays are created from sequences using NumPy's array function, including nested lists for multidimensional arrays with inferred shape and dtype, plus utilities like zeros, ones, empty, and range.
Explore data types in NumPy, learn how ndarrays interpret memory as specific dtypes, and cast arrays between types like int and float while noting string and pandas nuances.
Explore how NumPy arrays enable vectorized, element-wise operations, including scalar propagation and boolean comparisons, with a nod to broadcasting and indexing and slicing.
Explore numpy indexing and slicing, including how slices act as views and how scalars broadcast across selections. Understand how two-dimensional arrays extend these ideas to one-dimensional elements.
Learn to index and slice multidimensional arrays with comma-separated indices, producing lower-dimensional results, using 2d and 3d arrays and scalar or array assignments to r3d.
Master indexing and slicing in Python lists and arrays from 1d to 2d, using slices, integers, and views along axes, with colon syntax for whole axes.
Explore boolean indexing in numpy to select data rows using a boolean mask, invert conditions, combine masks, and apply to two-dimensional data.
Learn how numpy fancy indexing uses integer arrays to reorder rows, handle negative indices, and produce one-dimensional results, with copying behavior unlike slicing.
Explore transposing and swapping in numpy, using the transpose method and the .T attribute to view data without copying, and swap axis to reorder axes for matrix computations.
Learn how universal functions (ufuncs) are fast vectorized wrappers that perform elementwise operations on arrays, with unary functions like sqrt and exp and binary ones like add and maximum.
Learn array oriented programming with numpy, replacing loops by vectorized expressions for faster numerical computations, and visualize grid-based function evaluations using the mesh grid function and matplotlib.
Learn to express conditional logic with numpy where, a vectorized alternative to ternary expressions, replacing array values based on a boolean condition, with scalars and arrays.
Master numpy array methods for reductions like sum, mean, and standard deviation, with axis-aware statistics, and learn about cumsum, cumprod, min, max, argmin, and argmax.
Learn how boolean arrays coerce to 1 or 0, use sum to count true values, and how any and all test for true conditions, even in non-boolean arrays.
Explore in-place and copy sorting of numpy arrays, including sorting along an axis with numpy's sort, using np.sort to produce a sorted copy, and estimating quantiles by ranking values.
Explore the unique set logic in numpy, learning how np.unique returns sorted unique values from arrays. Compare it to Python's sorted set approach and learn membership testing with np.in1d.
Learn linear algebra basics: matrix multiplication, decomposition, and determinants with numpy dot for 2d and 1d arrays. Discuss linalg decompositions, inverse, determinant, and industry libraries like blas, lapack, and mkl.
Explore pseudo random number generation with numpy random, compare array-based sampling from the normal distribution to the built-in random module, and learn about seeds, global state, and isolated random state.
Explore how random walks model cumulative steps using python and numpy, including simulating a thousand-step walk, plotting, and computing first crossing times and basic statistics.
simulate numerous random walks at once with numpy, compute cumulative sums for all paths, and analyze crossing times to 30 threshold using boolean indexing and argmax, with different step distributions.
Explore the pandas library, its data structures and manipulation tools for fast data cleaning and analysis in Python, and its integration with numpy, scipy, statsmodel, scikit-learn, and matplotlib.
Explore pandas series as one-dimensional arrays with values and an index, learn default integer indexing, and select data using labeled indices.
Learn how a pandas series maps index values to data, is created from dictionaries, supports numpy-like operations that preserve the index, and can be reordered by providing keys.
Handle missing data in pandas by recognizing NaN values and using pd.isnull or notnull, then learn how series align by index labels.
Explore Pandas dataframes as rectangular tables with row and column indexes, holding mixed types, as a dictionary of series, and constructed from equal-length lists or arrays.
Learn how to use pandas dataframes to view the head, reorder columns, handle missing values, access columns as series, and modify columns via assignment for practical data manipulation.
Assign and align DataFrame values by length or index; insert missing values with a pd.Series. Delete columns with del and add by assignment; nested dicts map columns to indices.
Learn how Pandas treats a nested dict as a data frame, with outer keys as columns and inner keys as row indices, and how to transpose and explore index naming.
Discover axis labels and metadata within Pandas index objects, convert any label sequence into an index, exhibit immutability, and support set logic with duplicate labels.
Discover reindexing in Pandas to align data to a new index, introducing missing values. For time series, apply the method option to fill values, such as forward filling.
Explore reindexing data frames by rows or columns using a sequence, including label indexing with loc and options like index method, fill value, limit, and copy.
Learn to drop values along an axis in data frames and series, returning a new object or performing in place removal by row labels or columns.
Explore indexing with series labels, compare to numpy array indexing, note inclusive endpoints in label-based splicing, and retrieve columns from a data frame.
Advance indexing in data frame by using boolean arrays for slicing, raw selection syntax, and scalar comparisons, making the data frame more like a two dimensional numpy array.
Learn to use loc and iloc for selecting rows and columns in a data frame with numpy-like notation, using label or integer indexing, including single and subset selections.
Explore how pandas handles integer indexes, compare label-based and position-based selection, and use loc and iloc for precise indexing.
Explore how Pandas handles data alignment and arithmetic across different indexes, producing a union of index labels like an outer join and propagating missing values.
Learn how Pandas aligns data frames by both row and column labels, producing a union of indices and columns with missing values for non-matching labels.
Explore fill values with arithmetic methods for differently indexed dataframes. Use add with fill_value zero and reindex with zero fill to handle non-overlapping indices.
Explore how dataframes and series interact through operations, showing broadcasting across rows and columns, index alignment, and union re-indexing to handle missing labels.
Explore function application and mapping with numpy ufuncs on pandas dataframes, using frame.apply for column-wise or row-wise updates, including max–min difference and noting that sum and mean are dataframe methods.
Apply element-wise functions to a data frame with apply and map to format floating point values, and understand why method is called apply map as you prepare sorting and ranking.
Learn ranking and sorting data using index-based and sort values methods in data frames and series, with ascending and descending orders.
Sort pandas data like a frame by one or more columns with missing values at the end, and rank data with mean or first, across rows or columns.
Explore how axis indexes handle duplicates in pandas. Learn how is_unique checks label uniqueness and why duplicated labels yield a series rather than a scalar when indexing.
Explore how to compute descriptive statistics with Pandas, applying series and data frame reductions to obtain sum and mean while handling missing data with the skipna option.
Explore descriptive statistics with reduction methods, axis choices, and skipping missing values, and use describe to generate multiple stats such as min, max, mean, median, mode, variance, skew, and kurtosis.
Explore value counts, membership checks and unique values in pandas, compute unique values and frequencies, use isin for filtering, and apply value counts across data frames to build column-wise histograms.
Handle missing data with Pandas during data preparation, using drop, fillna, and isnull while examining NaN sentinel values and potential biases in data collection.
Filter missing data using dropna, isnull, and boolean indexing on series and data frames, dropping rows or columns with any or all NA values, or leveraging the rest argument.
Apply fillna strategies to address missing data by filling with a constant or a dict-like per-column value, using interpolation or mean and median, and choose in-place or new object options.
Learn to identify and remove duplicate rows in pandas data frames with duplicated and drop_duplicates, using boolean series and optional subset columns like K1 and keep choices first or last.
Explore function mapping and data transformation by applying transformations to values in a data frame column, illustrated with a food dataset in Pandas.
Learn to create a mapping from each food item or meat type to its animal source or ingredient type and add a column showing that origin.
Use the map method on a series to apply a function or dict-like mapping, converting capitalized values to lowercase. Map enables element-wise transformations and data cleaning, including lambda-based options.
Learn how to replace values in a series to fill missing data using the replace method, including single values, lists, or dictionaries, and its distinction from string replacement.
Rename axis indexes and labels with mapping or dictionaries, using the map and rename methods to transform in place or create a transformed copy of a data frame.
Explore discretization and binning of continuous data by creating age brackets with pandas cut, producing a categorical object with categories and codes to label data.
Explore discretization and binning with pandas, including value_counts, interval notation with open/closed signs, and custom bin names via labels; beware the constraint: labels must be one fewer than bin edges.
Create equal-length bins with cut and quantile-based bins with qcut. Cut yields unequal counts; qcut yields equal-sized bins using quantiles like 0.1, 0.5, 0.9.
Filter and detect outliers in a data frame using array operations to identify values with absolute value over three, then cap them to [-3,3] employing abs, sin, and sign.
Demonstrate random sampling and permutations using numpy.random.permutation to reorder data frames or series and select random subsets with or without replacement via the sample method.
Convert a categorical variable with k distinct values into a dummy indicator matrix for modeling or machine learning, using pandas get_dummies, with optional column prefixes to merge with other data.
Load the Movielens 1 million dataset and read the movies table with pd.read_table using a double colon separator. Address encoding issues and inspect the movie id, title, and genres.
Construct genre indicator variables from a zero matrix, then set ones as you iterate through movies. Map genres to columns using splits and indexer logic for the dummy frame.
Explore constructing indicator variables for multiple membership with a custom numpy array approach, and combine get_dummies with cut for discretization, plus setting a deterministic numpy seed for reproducible results.
Master Python string object methods for text manipulation, including split, strip, and join, and locate substrings with in, index, and find.
Explore Python string object methods, including find vs index, count, replace, ends with, starts with, join, split, strip, lower, and upper, with examples of not found and non-overlapping patterns.
Explore regular expressions as a flexible tool for searching, matching, and splitting text patterns, including whitespace, using Python's re module to compile patterns and find all matches.
Create a regex object with re.compile to apply the same expression across many strings, and compare match, search, and find all, with email pattern examples and ignorecase.
Extract email addresses with find all, explore match objects, and split matches into username, domain name, and domain suffix using grouped regex, then use substitution and group references.
Explore vectorized string functions in pandas to clean messy data, handle missing values with series str methods, and apply regex with options like ignorecase to validate and transform email addresses.
Learn vectorized string functions for element-wise operations, including strcat and pattern matching, plus methods like cat, count, extract, ends with, starts with, get, and type checks.
Explore hierarchical indexing in pandas, enabling multiple index levels on an axis to map higher dimensional data into a lower dimensional form, with a series indexed by lists of lists.
Explore hierarchical indexing with multi-index data to select sub subsets, reshape data, and perform group-based operations, including unstack and stack to form pivot tables.
Explore hierarchical indexing in a DataFrame by creating and naming a multi-index with levels like state and color, perform partial column indexing, and distinguish index names from row labels.
Reorder and sort levels in a frame by swapping levels and sorting by a single level to achieve lexicographic ordering.
Learn how to summarize statistics and index with DataFrames columns using level-based aggregation and set_index and reset_index for flexible indexing.
Merge data frames using SQL-based database-style joins in pandas, aligning rows by keys. Demonstrate many-to-one joins and how the merge function handles key naming.
Explore dataframe joins with database-style keys, mastering inner, left, right, and outer joins, understanding intersections, unions, and the behavior of many-to-many merges.
Explore how to perform many-to-many and multi-key joins in data frames, showing inner and outer merges using left_on and right_on, and managing overlapping column names with suffixes.
Merge on index by using the data frame's index as the merge key with left_index or right_index, and switch from inner join to an outer join for union keys.
Explore merging on index with hierarchically indexed data, where joining an index becomes a multiple key merge.
Explore merging dataframes on index and multiple columns in pandas, handling duplicate indices with outer joins, and using left_on and right_index for flexible merge scenarios.
Learn index-based merging with dataframe join to perform left joins and align on the left frame's row index. Use multiple dataframes and the join method as an alternative to concat.
Concatenating along an axis is explored using numpy and pandas, covering axis choices, labeling, and how pd.concat handles index overlap and data preservation.
Learn to concatenate data along an axis, compare inner and outer joins, and see how axis choice affects indexes and when keys become dataframe column headers.
Learn to concatenate pandas objects with pd.concat, choose axis and ignore_index, and use keys and levels to form a hierarchical index. Explore inner and outer joins.
Explore data combining with overlap by aligning overlapping indexes and using pandas combine_first to batch missing data from another data frame, similar to NumPy's where behavior.
Master hierarchical indexing to reshape data frames using stack to move columns to rows and unstack to move rows to columns, with practical examples.
Explore hierarchical indexing with unstacking and stacking in a data frame by level number or name, noting that the innermost level becomes the lowest in the result.
Explore how pandas.melt reshapes dataframes by merging multiple columns into a single long column, then pivot to reshape back to the original layout, using a key as a group indicator.
Learn how matplotlib enables two-dimensional, publication-quality plots for informative visualizations in data analysis. Create plots in IPython or Jupyter Notebook, identify outliers, and explore matplotlib APIs with seaborn and pandas.
Create and manage matplotlib figures and subplots using plt.figure and fig.add_subplot to arrange up to four plots in a 2x2 grid, with plotting commands drawn on the last figure.
Explore creating a 2x2 grid of subplots with plt.subplots, returning an axis array for indexing. Learn to share x and y axes and set a size of 8 by 6.
Adjust subplot spacing in Matplotlib using wspace and hspace via fig.subplots_adjust, enabling dynamic resizing; learn to fix overlapping axis labels with explicit tick locations and labels.
Explore customizing matplotlib line plots with color and line style, use markers to highlight data points, and control draw style, while understanding the plot objects returned.
Learn to customize plots in Matplotlib by setting axis labels, titles, ticks, and tick labels using the Pyplot and object oriented APIs, with practical examples on a random walk.
Add legends by supplying a label for each plot element and use plt.legend with loc options to place it, or omit elements with a _no_legend label.
Learn to draw on a subplot using Matplotlib patches, including rectangles, circles, and polygons. Add patch objects to axes with add_patch and build data visualizations from multiple patches.
Master line plots with pandas plotting, plotting each column as a line and automatically generating legends. Customize x and y ticks, limits, subplots, and figure options like title and grid.
Master vertical and horizontal bar plots using data frame indices as ticks, customize color and alpha, compare side-by-side groups, and build stacked bars with the genus-based legend.
Plot bar charts from crosstab data by normalizing rows to sum to one and visualizing party percentages, preparing for a Seaborn discussion in the next lecture.
Use Seaborn bar plots to compare the average tip_pct by day from a Pandas data frame, with 95% confidence intervals and optional arguments, and learn how Seaborn set alters aesthetics.
Visualize histograms as discretized bar plots of frequencies in evenly spaced bins and combine them with kernel density estimates using seaborn's plot method.
Explore scatter plots and point plots to examine relationships between two one-dimensional data series, using seaborn regplot for a linear fit and pair plots with diagonals showing histograms.
Master categorical data visualization with facet grids using Seaborn, including factor plot and cat plot, to compare groupings across time and colors, plus box plots for medians and outliers.
Explore how to group, aggregate, and transform data with pandas groupby, calculating statistics, pivot tables, and cross tabulations for reporting and visualization.
Explore the mechanics of group by and compute group means on a data frame using grouping keys such as arrays, column names, dicts, series, and functions via the mean method.
Master the mechanics of groupby by computing mean with keys and producing a series indexed by key values. Apply multiple keys to create an index of key pairs.
Master iterating over groups with the group by object, generating tuples of group name and data chunks, and handling multiple keys across different axes.
Explore selecting a column and indexing a group by object for column subsetting in aggregation on a data frame, returning a grouped dataframe to compute means for the chosen column.
Group data with dictionaries in pandas to sum columns by group, using dictionary-based groupings for dataframes and series as fixed-size mappings.
Discover grouping by functions in Python, using a function as the group key to name groups, with examples like grouping names by length and mixing with dictionaries, arrays, or series.
Learn how to group data with functions by aggregating along a level of a hierarchical axis, using the level keyword to select the level by number or name.
Explore data aggregation with group by methods, applying mean, count, sum, min, max, median, standard deviation, variance, and quantiles to transform arrays and compute statistics.
Learn to perform column wise aggregation on the tips dataset by day and smoker, add a tipping percentage column, and apply multiple descriptive statistics using aggregate and function lists.
Map data frame columns with name-function tuples, using the first element as the column name, apply same or different functions, and concatenate results when needed.
Learn how to return aggregated data without raw indexes by using as_index=False in groupby, optionally reset_index, and expose fields like day, smoker, total bill, tip size, and tip percentage.
Explore the split-apply-combine paradigm using pandas: group data by smoker, implement apply functions to extract top tip percentages, and concatenate results into a hierarchical index for analysis.
Master group keys, quantile and bucket analysis in pandas by using cut to create equal-length buckets or sample quantiles, then apply group by to compute statistics.
Learn how to fill missing values by group using pandas fillna and groupby apply, applying group-specific means or predefined values for east and west groups.
Explore random sampling and permutation through a deck of 52 English-style cards, drawing hands with or without replacement and grouping by suit to illustrate Monte Carlo sampling techniques.
Explore group weighted averages and correlations using split apply and combine operations on data frames and series, with category-based weights and a Yahoo Finance end-of-day prices example.
Compute yearly correlations of daily returns from percent changes, using SP as reference, then group by year to reveal inter-stock correlations such as Apple and Microsoft.
Demonstrate group wise linear regression using group by to perform ordinary least squares on data chunks, including regressing Apple on SP returns with statsmodels econometrics.
Explore cross-tabulation and pivot tables to summarize data by keys, using pandas groupby and pivot_table, and learn to add margins for row and column totals with a tipping dataset example.
Explore cross tabulation and pivot tables to compare groups using aggregation functions such as mean or count. Set margins, fill missing values, and group by index and time.
Explore cross tabulation, a pivot-table-like technique that computes group frequencies using pandas crosstab, with an example analyzing nationality and handedness.
Explore time series data in Python across fields like finance and economics, cover fixed frequency data, timestamps and intervals, and use the standard library's date, time, datetime, and timedelta.
Learn to convert datetime objects and pandas timestamps to and from strings with str or strftime using ISO C89 format specs, including year, month, hour, minute, and week information.
Convert strings to dates using datetime.strptime, dateutil parser, and pandas to_datetime, covering ISO 8601 and common date formats. Handle missing values and locale-specific representations, including abbreviated weekdays and months.
Master the basics of time series in pandas by working with timestamp-indexed series, NumPy datetime64 nanoseconds, and pandas timestamps, including frequency handling and time zone conversions.
Learn subsetting, indexing, and selection in time series with pandas, using label-based indexing, date strings, and time stamps to slice data without copying, with truncate support for dataframes.
explore handling duplicate indices in time series data by identifying non-unique timestamps, checking index uniqueness, and aggregating with group by on level zero.
Explore generating date ranges in pandas, including irregular time series, fixed frequencies such as daily, monthly, or every 15 minutes, and using date_range and read_date_range with normalization.
Explore date offsets and frequencies in pandas, using base frequencies like M or H, optional multipliers, and anchored offsets such as month end and last business weekday.
Explore week of month dates, a frequency class that enables selecting dates such as the third Friday of each month, with practical coding demonstrations.
Shift data in time series and data frames with the shift method to create leading and lagging values, while understanding NaN at ends and using frequencies to advance timestamps.
Explore shifting dates with Pandas date offsets, including anchored offsets that roll forward or back according to frequency rules. Learn how resample provides a faster alternative for date shifting.
Learn timezone handling in python using the pytz library and pandas wrappers, leveraging the Olson database to manage DST changes, UTC offsets, and time zone names.
Explore localization and conversion of time zones in pandas time series, turning naive timestamps into localized indices and converting to UTC, Berlin, or other zones, while handling daylight saving ambiguities.
Learn how aware timestamp objects localize naive timestamps to time zones, convert between zones with pandas date offset objects, and store UTC nanoseconds while respecting daylight saving time transitions.
Learn how different time zones affect time series operations; when combining series, the result becomes UTC because timestamps are stored in UTC.
Explore period arithmetic for time spans like days, months, quarters, and years using the period class with a frequency. Create period ranges with period_range and use PeriodIndex as pandas index.
Convert period frequencies in pandas using the as_frac method to transform annual periods into monthly or fiscal-year subperiods, including start or end of year choices.
Explore period frequencies of quarters and learn to perform quarterly data arithmetic, including fiscal year end considerations, generating quarterly ranges, and converting to daily frequency.
Convert time-stamped series and dataframes to periods with to_period, then inspect the inferred frequency. Convert back to timestamps with to_timestamp, and learn to handle duplicates in the data.
Learn to build a period index from year and quarter arrays with a fixed frequency, using pandas to index a dataframe.
Explore frequency conversion and resampling in Pandas, including downsampling and upsampling, using resample to group data, apply aggregations, and customize labels, closed intervals (right or left), and fill methods.
Learn how to downsample time series data by resampling into regular lower frequencies, define bin edges, choose left or right interval closure, and label bins by start or end.
Explore interpolation and upsampling to convert weekly data to higher frequency without aggregation, use asfreq and resample, fillna, and reindex to fill missing values.
Learn to resample data indexed by periods using period-based frequency, including upsampling and downsampling rules and the start or end convention for quarter, annual, and weekly time spans.
Explore sliding window and moving window functions for time series, including rolling and expanding means, handling missing data, and fixed-size or time-offset windows.
Explore exponentially weighted functions with a constant decay factor, using a span to mimic a moving window, and compare adaptive weighting to equal weighting for faster change detection.
Explore functions of the binary moving window to compute rolling correlations with the S&P 500 across time series. Apply custom reductions over a moving window, including quantiles and percentile ranks.
Explore pandas categorical data types to improve performance and memory usage by dictionary encoding repeated values as category codes referencing category dictionary; learn dimension tables and renaming or appending categories.
Explore pandas' categorical type, encoding data with integer categories and converting a column to categorical while inspecting its categories and codes, including ordering with as_ordered and from_codes.
Explore computations with categoricals in pandas, compare them to string arrays, and use cut binning, quartile labels, and groupby statistics to preserve ordering.
Learn how converting to categorical data types boosts analysis speed and reduces memory usage in large datasets; see the one-time cost of category conversion.
Explore categorical methods for series in pandas, including accessing categories and codes, setting new categories with set_categories, and trimming unobserved categories with remove_unused_categories to improve memory and performance.
Learn to transform categorical data into dummy variables for modeling using one-hot encoding. Build a dataframe with a column per category and 1s or 0s, via pandas get_dummies.
Explore group transforms and group by operations, comparing transform with apply, and leverage vectorized, shape-preserving aggregations, including rank calculations for each group.
Learn to resample grouped time series data using pandas time grouper, applying a five-minute frequency while ensuring the time index as the grouping key.
Explore method chaining and the functional alternative df.assign for data frame transformations. See how to avoid temporary variables, bind callables, and craft a single readable chain.
Explore the pandas pipe method to simplify method chaining with custom and third-party functions, and learn to demean columns by group means with a reusable pattern.
Learn how pandas aids data loading, cleaning, and feature engineering, and how to connect it with modeling libraries like statsmodels and scikit-learn, including OLS.
Explore pandas and model code by importing pandas as pd, creating dataframes, and using the values attribute for homogeneous data, with attention to heterogeneous data returning object arrays.
Convert pandas dataframes to numpy, attach model parameter names to output columns, and manage metadata; replace category with dummy variables and drop the category column, or use Patsy for models.
Explore Patsy, a Python library for describing linear models with a small string based formula syntax, and generate design matrices using a formula string and a dataset.
Explore Patsy design matrices with numpy arrays and metadata, including intercept conventions. See how Patsy objects feed into numpy.linalg.lstsq and retain column names via design_info.
Explore data transformations in patsy, including standardize and center, and learn how to apply stateful transforms and design matrices to new data using saved statistics.
This lecture covers transforming categorical data into a design matrix using dummy variables in Patsy, handling intercepts to avoid collinearity, and using interaction terms in analysis of variance.
Explore estimating linear models in statsmodels, from ordinary least squares to iteratively reweighted least squares, using array-based and formula-based interfaces with intercept handling.
Explore ordinary least squares regression with statsmodels, using m.ols and the formula API to fit models, view parameters and t-values, and predict on new data.
Explore estimating time series using autoregressive and state space models, including Kalman filtering and multivariate AR approaches, and learn practical AR model fitting with max lags in statsmodels.
Explore scikit-learn, a leading Python toolkit for supervised and unsupervised learning, with model selection, evaluation, data loading, transformation, and persistence using the Titanic dataset.
Model Titanic survival with scikit-learn using a train/test split, median age imputation, and is_female encoding for logistic regression, with cross-validation for model tuning.
Explore real-world datasets from GitHub in a data analysis section, using pandas and numpy to parse 2011 usa.gov Bitly hourly snapshots with json lines and json.loads to Python dicts.
Explore counting time zones in Python from raw data to counts with dicts and collections.Counter, compare the standard library approach with the pandas solution, handling missing fields.
Analyze time zones with pandas by building a dataframe, using value_counts, filling missing timezone data with fillna, and visualizing with matplotlib and seaborn.
Analyze user agent strings to classify Windows versus non-Windows users, group by time zone, and identify top zones, then visualize as stacked bar plots with normalized percentages using pandas operations.
Explore the Movielens 1 million dataset: 1 million ratings from 6000 users on 4000 movies, with metadata and demographics for building recommendation systems using machine learning algorithms.
Merge ratings, users, and movies in the MovieLens 1M dataset with pandas to compute mean ratings by movie and gender using pivot tables, then filter titles with 250 ratings.
Identify the most divisive movies by measuring rating disagreement through mean differences and variance or standard deviation, revealing gender-based preferences and the need to transform pipe-separated genres for analysis.
Explore United States baby name trends from 1880 to 2010 using SSA data, visualize name proportions and rankings, and practice data wrangling with pandas to assemble a unified dataset.
Aggregate U.S. baby names data by year and sex using groupby and pivot tables, add a prop column relative to total births, and extract the top 1000 names for analysis.
Analyze name trends using a top 1000 dataset, split by gender, and create time series of births for names like John and Mary, plotting totals with dataframes.
Explore increasing naming diversity by measuring the top 1000 names' share of births and the count of names needed to reach 50% of births, via cumulative sums and searchsorted.
Explore how to compute and plot naming diversity by year and sex, generating time series that show girls' names being more diverse and increasing over time.
Analyze how boy name final letters shifted over a century using births by year, sex, and last letter; compute proportions and visualize trends with bar plots and time series.
Explore how boy names and girl names shift in gender usage over time, aggregate by sex and year, normalize within year, and plot the breakdown by sex over time.
Explore the USDA food database and its nutrient information in json format, provided by the US Department of Agriculture. The dataset includes records like Kentucky Fried Chicken and nutrient values.
Wrangle the USDA food database by converting nutrient lists into a unified data frame, extracting food ids, groups, and descriptions, and merging nutrients into a single table while handling duplicates.
Rename and map dataframes to merge USDA food info with nutrients, then plot median values by food group and nutrient type and identify the most dense foods for each nutrient.
Explore the 2012 federal election commission database of campaign contributions, load with pandas, filter positive donations, and map candidates to parties to analyze donor patterns for Obama and Romney.
Clean data by mapping occupations and employers, then examine donation statistics by occupation and employer, noting lawyers favor Democrats and business executives favor Republicans.
Discretize donation amounts using the cut function into buckets, compare Obama and Romney via histograms, sum and normalize by size, then analyze state-level donations and possible refinements.
Explore numpy array internals by examining data blocks, dtype, shape, and strides, and learn how strides enable zero copy array views and advanced slicing.
Explore the numpy dtype hierarchy, using superclasses such as np.integer and np.floating to identify integers, floats, strings, or objects, and inspect parent classes with the MRO method.
Learn reshaping arrays to convert a 1D array into multidimensional forms using reshape, including -1 inference, and compare flattening or raveling as inverse operations with copy vs view behavior.
Learn how numpy controls in memory data layout with row major (C) and column major (Fortran) orders, including reshape and ravel behavior, and choosing between C or F order.
Learn to split and concatenate arrays in numpy using concatenate, vstack, hstack, dstack, column_stack, and r_ and c_, and split with indices along axes.
Explore how repeat and tile extend arrays by duplicating elements and stacking copies, including axis-aware repetition for multi-dimensional arrays and flattening behavior when no axis is specified.
Explore take and put techniques, using fancy indexing with integer arrays and the axis keyword to select and set elements, including flattened indexing when needed.
Explore how broadcasting lets arithmetic happen between arrays of different shapes, from scalar with an array to demeaning columns by subtracting means, following the trailing-dimensions rules.
Explore how broadcasting works across higher dimensional arrays, apply shape compatibility rules, and insert new axes with np.newaxis to enable axis-wise operations efficiently.
Set array values using broadcasting rules and array indexing in numpy, ensuring shape compatibility when assigning a one-dimensional value to the array's columns.
Explore numpy ufunc instance methods, performing vectorized reductions with reduce and accumulate, use outer for pairwise operations, and group data with local reduce using bin edges.
Learn how to create ufunc-like functions in NumPy from pure Python using numpy.frompyfunc and numpy.vectorize, and why they are slower than the C-based ufunc loop.
Explore structured record arrays and nested dtypes to represent tabular data in a single memory block, using field names, shapes, and two-dimensional field access.
Compare in-place vs out-of-place sorting in Python lists and NumPy arrays; ndarray sort sorts in place while numpy.sort returns a new copy, with axis-based sorting for arrays.
Explore sort, argsort, and lexsort to reorder datasets by keys, producing indices for sorted order. See examples sorting by last name then first name and sorting 2d arrays with numpy.
examine alternative sorting algorithms and partially sorting arrays. highlight merge sort as the stable option with n log n performance, contrast with quicksort, and introduce numpy partition and argpartition.
Explore numpy.searchsorted to perform binary searches on sorted arrays and return insertion indices. Learn how equal values return the leftmost index and bin data with bucket edges.
Explore how Numba accelerates numpy-like code by compiling Python with llVM, enabling fast CPU and GPU execution; compare pure Python loops with decorated, jitted functions that outperform vectorized numpy.
Explain how Python identifiers name variables, functions, and classes, enforce allowed characters and case sensitivity, and distinguish private and strongly private names by single or double leading underscores, trailing underscores.
Explore reserved words in programming and why they cannot be used as identifiers, and review Python keywords like if, def, return, import, try, break, for, in, pass, while, lambda, yield.
Explore python strings, including string literals in quotes, zero-based slicing, and using plus for concatenation and the repetition operator to repeat strings.
The Python for Data Science and Machine Learning course is designed to equip learners with a comprehensive understanding of Python programming, data science techniques, and machine learning algorithms.
Whether you are a beginner looking to enter the field or a seasoned professional seeking to expand your skillset, this course provides the knowledge and practical experience necessary to excel in the rapidly growing field of data science.
Course Objectives:
1. Master Python Programming: Develop a strong foundation in Python programming, including syntax, data structures, control flow, and functions. Gain proficiency in using Python libraries such as NumPy, Pandas, and Matplotlib to manipulate and visualize data effectively.
2. Data Cleaning and Preprocessing: Learn how to handle missing data, outliers, and inconsistent data formats. Acquire skills in data cleaning and preprocessing techniques to ensure the quality and reliability of datasets.
3. Exploratory Data Analysis: Understand the principles and techniques of exploratory data analysis. Learn how to extract insights, discover patterns, and visualize data using statistical methods and Python libraries.
4. Statistical Analysis: Gain a solid understanding of statistical concepts and techniques. Apply statistical methods to analyze data, test hypotheses, and draw meaningful conclusions.
5. Machine Learning Fundamentals: Learn the foundations of machine learning, including supervised and unsupervised learning, regression, classification, and clustering. Understand the strengths and limitations of different machine learning algorithms.
6. Machine Learning Implementation: Gain hands-on experience in implementing machine learning models using Python libraries such as scikit-learn. Learn how to train, evaluate, and optimize machine learning models.
7. Feature Engineering and Selection: Develop skills in feature engineering to create meaningful and informative features from raw data. Learn techniques for feature selection to improve model performance and interpretability.
8. Model Evaluation and Optimization: Learn how to assess the performance of machine learning models using techniques like cross-validation and evaluation metrics. Understand the importance of hyperparameter tuning and regularization for model optimization.
9. Deep Learning Concepts: Explore the basics of deep learning, including neural networks, activation functions, and gradient descent optimization. Gain an understanding of deep learning architectures and their applications.
10. Practical Deep Learning: Acquire practical experience in building and training neural networks using popular deep learning frameworks such as TensorFlow or PyTorch. Learn how to apply deep learning techniques to solve real-world problems.