
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore NumPy and pandas through a hands-on, project-based course, covering arrays, indexing, slicing, filtering, sorting, broadcasting, and essential tools for analyzing and transforming data frames and time series.
Analyze a course project with over 2 million transactions by product, household, and store. Use Python to read flat files, join tables, compute KPIs, and visualize discount impacts on margins.
Learn core pandas functionality for data frame manipulation and basic data visualization with the map plot lib API in Jupyter notebooks. Google Colab is also introduced as an alternative.
Install and launch jupyter notebooks using Anaconda on mac and pc, navigate to Anaconda Navigator, create a coursework folder, and optionally use Google Colab for cloud notebooks.
Explore Pandas and NumPy fundamentals, including array creation, indexing, slicing, vectorization, and broadcasting; convert lists to NumPy arrays and use Pandas DataFrames built on NumPy for efficient data analysis.
Learn NumPy arrays as fixed size containers offering efficiency over Python lists; create one dimensional or two dimensional arrays from lists, inspect ndim, shape, size, dtype, and use transpose.
Convert a python list to a numpy array and inspect its dimensions, shape, size, and data type to master numpy basics in this warm-up assignment.
Convert a list to a NumPy array, inspect its shape, size, and data type, and explore reshaping it into 10x1, 2x5, or 5x2 arrays.
Explore how NumPy creates arrays with ones, zeros, arange, linspace, and reshape. Learn to specify dtype, create 2 by 5 arrays, and apply reshape, transpose, and identity matrices.
Explore random number generation in numpy via a default random number generator, seeding for reproducibility, and drawing from uniform and normal distributions for sampling and simulations.
Learn to create numpy arrays from scratch, including a five by two array and a three by three random array, using numpy's array creation functions.
Generate and reshape arrays with numpy using linspace to form ten multiples. Create a three by three random array with seed 2022 and practice indexing and slicing.
Explore numpy arrays with indexing and slicing, from one-dimensional access using zero-based indices to two-dimensional coordinates, using start, stop, and step, including negative indices.
Master NumPy indexing and slicing by extracting a random multi-dimensional array: slice the first two rows, the first column, and the second number in the third row.
Master NumPy indexing and slicing to extract rows and columns from random arrays, including selecting the first two rows and all columns, and the second element of the third row.
Apply NumPy to perform elementwise array operations with scalars and other arrays, mastering vectorization and broadcasting for efficient, loop-free calculations.
Apply numpy to adjust prices by adding a five shipping cost, derive discount percent from a random array, compute percent owed, and determine the final amount owed with rounding.
Add five to every price in a NumPy array, reshape the data, and compute final owed amounts after a random discount, then apply array filtering.
Master filtering arrays and data frames with boolean masks in NumPy and pandas, using logical tests and and/or operators to select data, then safely modify array values based on conditions.
Explore the numpy where function to perform conditional logic, returning 'out of stock' or product names, and chain conditions to classify numbers as even, odd, or exclude nine.
Filter the product array to prices greater than 25. Include cola in the fancy feast special and build a shipping cost array with zero for prices above 20, else five.
Learn to filter a six-product array by a prices array with NumPy, using a mask and or logic to include COLA, and set free shipping with numpy.where.
Apply NumPy array aggregation methods such as sum, mean, max, and min, and aggregate across rows or columns; relate to pandas dataframe and basic analysis tasks like total value computations.
Explore NumPy array functions to summarize data with median, percentiles, square roots, and unique values; apply these robust statistics to arrays such as sales and product value.
Sort arrays with pandas using sort method and in-place options, compare to numpy sort returning a copy, and use indexing and negative slices to locate min, max, or reverse order.
Learn to compute mean, min, max, and median of the top three prices and extract unique price tiers using Python in a NumPy and Pandas context.
Explore solving aggregation tasks with sorting, mean, min, max, and median on top three prices; extract unique price tiers and preview broadcasting and vectorization in pandas.
Learn vectorization with NumPy and pandas to maximize efficiency by pushing array operations into optimized C code, avoiding Python loops, and using broadcasting for element-wise computations.
Master broadcasting in NumPy to perform vectorized operations by expanding smaller arrays to match larger shapes, as shown by 3x3 arrays with a scalar across rows or columns.
Analyze sales data with NumPy and Pandas by reading a CSV, filtering by product family, sampling half, and classifying as above both, above mean and median, or below both.
Apply a step-by-step NumPy workflow to filter transactions, sample data with a random mask, compute mean and median, and categorize observations by comparing to these statistics, then preview pandas.
Learn how NumPy forms the foundation for pandas, enabling efficient arrays, vectorization, and broadcasting for data analysis, with memory-efficient, uniform data types underpinning operations.
Discover pandas series, the one-dimensional data structure built on numpy arrays with a custom index and optional name. Learn to create, access, and inspect a series’s values, index, and dtype for pandas workflows.
Explore pandas data types, including numpy booleans, integers, floats, and object text, plus time series, and master type conversion with as_type for reliable numeric and date time handling.
Demonstrate data type conversion by turning a numpy oil price array into a pandas series, naming it, and computing means before and after converting to integers.
Learn data types and type conversion in pandas and numpy by creating an oil values array, turning it into a series, and computing its mean.
Explore how Pandas series use the index to access data, compare default integer indices with custom labels, and slice with label-based indices for time series and data frames.
Learn to use the iloc accessor for positional indexing in pandas; access single rows, slices, and lists in both series and dataframes, more efficient and recommended by pandas.
Master the .loc accessor for label-based data access in dataframes and series, enabling row and column selection by labels, lists, or ranges with inclusive stops.
Learn how duplicate index values in pandas series and dataframes affect lookups and how reset index with drop=true restores a clean integer index.
Set the date series as the index for an oil price series, compute means of the first and last ten values, and slice 2017-01-01 to 2017-01-07 with a reset index.
Create a date index for oil series, compute mean of first and last ten rows with positional slices, then slice from 20170101 to 20170107 by labels and reset the index.
Filter pandas series with boolean masks using the lock assessor, applying comparisons and membership tests; build masks for combined conditions and use tilde for not in.
Learn how to sort a Pandas series by values or by index, using sort_values and sort_index, with ascending and in-place options.
Extract the ten lowest prices, then sort them by date from most recent to oldest. Filter to include provided dates with prices at or below 50 per barrel.
Sort the oil price series by values to identify ten lowest prices, then sort by date descending and filter by date and price less than or equal to 50.
Explore numeric series operations in pandas and NumPy, using Python operators or top pandas methods to add, subtract, multiply, divide, modulo, and exponential, and handle missing values with fill values.
Explore pandas text handling with the string accessor STR, applying strip, upper/lower, slicing, contains, replace, split, and expand to create new columns for data cleaning.
Perform series operations by raising oil prices 10%, adding $2, and computing each price's percent difference from the max; extract the month from the index dates as an integer.
Learn series operations in python data analysis: apply percentage and fixed increases, compute max price, derive percentage differences, and extract month from date strings using series indexing and aggregations.
Master numerical series aggregations in pandas, including count, sum, mean, median, min, max, and quantiles, and understand interpolation effects on percentiles.
Learn how to analyze categorical series with pandas using unique, value_counts, and normalized value counts to reveal frequencies, percentages, and rare categories across data.
Apply NumPy and pandas aggregation methods to compute March price sums and means, counts for January and February, 10th and 90th percentiles, and integer-value frequencies, normalized to percentages.
Learn to filter a date-indexed series by month, compute mean and sum, use quantiles for 10th and 90th percentiles, explore counts and value counts, and convert data types for analysis.
Identify missing data in pandas using NumPy nan values and pd.NA, and learn to use arithmetic methods with a fill value to handle nans.
Identify missing data in pandas using isna and value_counts, summarize with boolean masks, and quantify with sum and mean to compare against other values.
Identify missing values in pandas and numpy and learn when to drop rows or fill in values, including zero or the mean, for numeric and categorical data.
Count the missing values in the price column using isna, then fill the missing values with the median of the oil price series.
Learn to handle missing data in a pandas oil price series by counting missing values with a mask and sum, imputing with the median, and using apply and where methods.
Apply custom Python functions to pandas series with the apply method, compare it to vectorized built-ins, and learn when to use lambdas or pandas built-ins for efficiency.
Learn how the pandas where method returns series values from a boolean test, with a false value and in-place option, and compare it to numpy where and tilde-inverted tests.
Apply conditional transformations in a pandas oil price series using where: set missing values, multiply two dates by 0.9, else multiply by 1.1, and adjust by the 90th percentile.
Apply a boolean function with a lambda and a 0.9 quantile to decide buy or wait, then use NumPy where to adjust prices and add a new price column.
Discover pandas series, their index, and how series form data frame columns; access rows with positional indexing (iloc) or label-based (loc), and use NumPy for filtering, sorting, and aggregation.
Create a dataframe from a Python dictionary or NumPy array using keys as column headers and lists as rows. Read data later with Pandas read_csv and inspect shape, data types.
Learn to inspect data frames with head, tail, and sample, view info including memory usage and shape, and describe numeric statistics with include for more columns and reproducible random samples.
Practice reading a csv file from a relative path and accessing the transactions data. Inspect its number of rows and columns, column names, and data types.
Master pandas dataframe basics by using read_csv with a path variable, looping through files, and inspecting shape and dtypes to identify integers and date values stored as objects.
Learn to inspect data frames with head, tail, and sample, then use info and describe to assess data types, memory usage, missing values, and statistics for numeric and categorical columns.
Explore a data frame with head to view top rows, check missing values, inspect with info, and use describe with all to reveal dates, counts, and a right-skewed distribution.
Access DataFrame columns via bracket or dot notation, with bracket always reliable for nonstandard names. Use a list for multiple columns and loc/iloc for multi-column access.
Master accessing a data frame with iloc and loc, using positional and label-based indexing to select rows and columns, plus slicing and returning a series or data frame.
Use loc and iloc to exclude the January 1 row, keep only store number and transactions, and compute unique store numbers and total transactions in millions.
Learn to use pandas' drop method to remove rows (axis=0) and columns (axis=1), drop redundant id column, manage in-place changes, and optimize memory by keeping intermediate dataframes.
Identify and drop duplicate rows in a data frame using the duplicated and drop duplicates methods, with subset, keep, and ignore index options to maintain data quality.
Learn to manipulate a transactions dataframe by permanently removing the first row, dropping the date column but not in place, and returning the last row for each store.
Drop and manage data in a dataframe using in-place and not-in-place drops, removing the first row and a date column, then keep the last transaction per store with drop duplicates.
Learn to identify and handle missing data in dataframes using isna and info, and tailor fills or drops by column with dicts and subset arguments.
Read and summarize missing data in oil price data, including missing dates and values, then compare mean oil prices when filling with zero versus the mean.
Compare missing data strategies in pandas by counting missing values, imputing with zero versus mean for the DX Coil WTI oil price, and observe how imputation affects summary statistics.
Learn to filter dataframes with boolean masks, select rows and columns, apply multi-condition logic, and perform inner column comparisons and date-based filtering using loc.
Learn how the pandas query method filters dataframes with SQL-like syntax. Filter with and/or conditions, in-operators, and external variables, creating efficient, intuitive queries without repeating dataframe names.
Use pandas to filter dataframes and compute the percentage of days with over 2000 transactions. Also sum for stores 25 and 31 in May or June with under 2000.
Learn how to filter a transactions data frame using boolean masks, iloc, and the query method, compute percentages, and summarize with sums for stores 25 and 31.
Sort data frames by index, axis, and values; explore multi-column sorting with ascending/descending, in-place vs returning a new data frame, and how NaNs sort.
Sort dataframes with the transactions dataset, identify five days with the highest transaction counts, sort by date from earliest to latest with high-to-low per day, and reverse alphabetical column order.
Sorts the transactions dataframe to identify five days with the highest transaction counts using sort_values in descending order, then sorts by date ascending and transactions descending to reveal trends.
Rename and reorder columns in pandas dataframes by assigning new names via the columns property, using the rename method with dict or lambdas, and applying reindex for exact order.
Learn to rename columns in the transactions DataFrame and reorder them: rename 'transaction count' and 'store NBR' to 'store number,' then set the order to date, store number, transaction count.
Rename columns with a dictionary via the rename method and axis=1, then reorder with reindex in a single chained pipeline, keeping the original data frame intact for next steps.
Create new pandas columns using arithmetic between a series and a scalar or between series, including tax amount from sales and total column, plus boolean-based conditional arithmetic like taxable category.
Create percent to target and target boolean columns, compute a bonus payable by conditional logic, and extract month and day of week from date times in the transactions data.
Create arithmetic and boolean columns in pandas, compute percent to target and met target, determine bonus payable, and extract date parts like month and day of week.
Master how to build complex conditional columns with NumPy Select by defining multiple conditions and corresponding choices to create a Sale Name column and a default value.
Create a seasonal bonus column in a pandas DataFrame with December holiday bonus, May corporate month Sundays, and July summer special Mondays, then compute total owed at $100 per day.
Apply numpy select to assign holiday bonuses in a dataframe by defining conditions and corresponding choices, then compute the total payout.
Explore the pandas map method to map dataframe values via a dictionary, create new columns like vegan, and format prices with a lambda, saving time over long conditional logic.
Discover how the pandas assign method creates multiple columns in one step, returning a dataframe and enabling complex, chainable transformations like tax amount, promotion flags, and year extractions.
Drop unnecessary columns to keep date, store number, and transaction count, recreate target percent, target bonus payable, month, day of week, and seasonal bonus, then spot check totals against 822,900.
Learn to use DataFrame.assign to create and chain new columns, drop and overwrite columns, and understand in-place versus returned data frames as you work with data types in pandas.
Explore memory optimization with the Pandas categorical data type, converting repeated text to integers to reduce memory usage and boost dataframe performance.
Learn how to convert single or multiple data frame columns using as type method and assign, including date to datetime64 and promotion to float, with cleaning steps and memory considerations.
Learn memory optimization in pandas by dropping unused columns, downcasting numeric types, and converting objects to numeric or datetime; explore when using categorical types helps or hurts memory usage.
downcast numeric data types in pandas from 64-bit to 8, 16, or 32 bits to save memory, with class level, price, and students enrolled as examples; optimization should be iterative.
Practice reducing a pandas transactions dataframe’s memory usage from about 10.1 MB to under five MB, using the info method to monitor changes and adjust data types in the assignment.
Optimize a data frame's memory by downcasting numeric columns (e.g., int32, int16, int8) and using category for seasonal bonuses, guided by describe results.
Master pandas data frames by using head, tail, info, and describe. Filter and sort, create columns with assigned method, and optimize by converting object data types and using categoricals.
Master grouping and aggregating data frames, creating pivot tables and melting data frames to summarize numeric statistics by groups, including multi index handling and mean or sum calculations.
Group data frames with the groupby method to produce category-based summaries. Aggregate columns, see index behavior, and compare metrics like sales by family or goals by team.
Learn to group data by store, sum transactions, and extract the top ten stores sorted from highest to lowest, using pandas in a hands-on assignment.
Group and aggregate a data frame by store number, sum transactions, sort in descending order, and extract the top ten stores using iloc for a clean top-ten view.
Group by multiple columns in pandas to create a multi index, or use as_index=False for clean frames; aggregate sales by family and store, or goals by home team and season.
Group data by store and month to compute total transactions, then sort by month ascending and by transactions descending within each month for dashboard-ready insights.
Learn to group transactions by store number and month, compute the sum of transactions for each group, and sort by month and by transactions using multi-index dataframes.
Explore multi-index data frames, learn how to access and slice rows using outer and inner index levels, tuples, and multi-level columns.
Modify pandas multi-index data frames by resetting indices to turn levels into columns, swapping index levels, and dropping levels, returning to a simple integer base index for easier filtering.
Learn to access rows and columns in Pandas multi-index data frames, select a specific row and the mean of the transaction column, and drop a column index level.
Learn to work with multi-index dataframes in pandas by selecting rows with iloc and loc, manipulating column levels, resetting and dropping indexes, and performing multiple aggregations with agg.
Leverage the agg method for efficient groupby aggregations, perform single or multiple stats, and use named aggregations to create clear, single-level columns for sales and on promotion.
Explore assignment four by using the agg method in pandas to compute average days to hit targets and total bonuses by store, month, and weekday, then sort by bonus payable.
Use the agg method to compute the mean of target and the sum of bonus payable, grouped by store, month, and day of week, then sort to identify top stores.
Master pandas transform to compute group-level statistics while preserving rows, enabling per-row comparisons like store sales against store averages and home-team goals against league averages.
calculate the mean of transactions by store number and day of week, add an average per store-day column, and compute a difference column, preserving all rows.
Learn to transform a dataframe by computing average store transactions by store and day of week using assign and groupby, then add a difference column for trend analysis.
Explore pivot tables in pandas, compare them with Excel and group by, and learn to create, filter, and aggregate with index, columns, values, and margins for insightful summaries.
Pass min and max in ag func to pivot tables, use a dictionary of columns for multiple aggregations, and weigh pivot table versus groupby to avoid overly wide results.
Create heat maps from pivot tables by applying background gradients and a cmap color map to reveal insights across stores and product families.
Learn how to melt dataframes to convert wide tables into long data format, using id_vars and value_vars to produce country-year gdp rows.
Build a pivot table of store number by day of week, the sum of bonus payable, filter zeros, apply a heatmap, then melt to one row per store and day.
Learn to build a filtered pivot table from a transactions data frame, create a heat map by day of week and store, and melt and reshape the result for visualization.
Master aggregation with group by to generate summary reports from data frames, handling multi-index frames, and using pivot, melt, and named aggregations to shape insights for visualization.
Learn to visualize data in pandas with the plot method, creating line, bar, pie, scatter, and histograms, customizing charts via the Map Plot Lib integration to tell a story.
Plot oil prices by dates in the oil data frame to see trends with a simple line chart. Explore the 2014 oil price decline as a potential case study.
Plot time series data in a notebook, compare line chart options with x=date versus setting the index, and filter by year to reveal 2013–2014 trends.
Format plots with titles, axis labels, colors, legends, figure size, and subplots; set a clear chart title and axis labels like date and daily transactions for store 44 transactions 2013–2017.
Learn to customize chart colors using color names or hex codes, assign colors to data series with the color argument, and apply color maps and palettes in map plot lib.
Master line styles in multi-line charts by using the style argument to switch from solid to dashed, dash-dot, or dotted; filter by year 2014 to reveal the styles more clearly.
Learn to add, reposition, and customize legends in pandas map plot lib charts, including turning legends off, selecting locations, using box to anchor coordinates, and enabling grid lines.
Explore chart styling in pandas with matplotlib and seaborn templates, applying pre-built styles like dark grid and 538, and customize colors, lines, and alpha without starting from scratch.
create a stylized line chart by renaming the price column, adding a title and axis labels, using a dark grid, and converting the date column to date time 64.
Learn to create a stylized line chart by using seaborn with a dark grid, renaming the oil price column, setting a datetime index, and customizing title, axes, and color.
Discover how to create subplots with multiple series, customize layouts and figure sizes, and use shared axes to compare data clearly in Python data analysis with NumPy and Pandas.
Filter transactions to stores 1–4, pivot to dates as rows and stores as columns, plot a 2x2 grid of line charts, and see which stores peak and if spikes align.
Learn to create subplots and pivot tables of sales by store, using a date index, and compare four charts with a shared y-axis to reveal store performance and seasonal patterns.
Learn to create and customize bar charts in map plot lib, including vertical and horizontal bars, dot plot, and grouped aggregations with sorting and axis adjustments.
Learn to build grouped, stacked, and 100% stacked bar charts from pivoted data, customize x axis labels, and compute percent shares with a lambda across months and stores.
Extract month from the datetime index, build sales table, and visualize with horizontal bar chart (y: month, x: sales) and stacked chart (month on x-axis, total sales stacked by store).
Sum sales by store to create sorted bar charts. Build a stacked horizontal bar chart with axis fixes, noting store three leads and nine to eleven dips below a million.
Learn to create and interpret pie charts for categorical data as 100 percent composition, and scatter plots for numerical relationships, including sorting slices, start angle, labeling, and regression exploration.
Plot the relationship between stores two and three sales with two scatterplots, color by month to reveal temporal differences, and optionally explore a pie chart of stores by sale.
Plot scatter plots from an aggregated table to reveal sales relationships and outliers across stores, colored by month, with December highlighting peak activity, and summarize insights with a pie chart.
Learn to visualize data distributions with histograms in Pandas, compare alcohol and prepared food sales, tune transparency with alpha, and interpret outliers and means across stores.
Create overlaid histograms to compare sales distributions for stores 2 and 3, identify outlier days, using the stores 1 to 3 data frame in the notebook.
Plot histograms to compare distributions across data series, using alpha and selective columns to contrast stores two and three, and save figures for further modeling insights.
Save your Pandas visualizations as image files with proper padding and explore next steps in seaborn, matplotlib, plotly, dash, and geospatial libraries for richer, shareable visuals.
Tackle a midcourse project that analyzes large transactions and products datasets using pandas. Create new discount metrics, perform aggregations, and build plots to reveal insights.
Cast data types to reduce memory, create total and percentage discount columns, and analyze sales, households, and top products using pandas in the mid-course project.
Explore dates and times in python and pandas, mastering the date time data type, time series concepts, date formatting, and operations like shifting, deltas, and moving averages.
Convert date columns to datetimes using pandas to_datetime with errors=coerce and infer_datetime_format=true to handle invalid values, and reduce memory usage by storing dates as datetime64.
Format pandas datetime data with custom date codes like %D and %Y using string formatted time. Apply these formats in dataframes for presentation and charts, noting the resulting object dtype.
Extract date time components with dedicated assessors to create dataframe columns for year, quarter, month, day of week, and time parts like hour, minute, and second for aggregation and filtering.
Explore pandas datetime basics by loading a transactions dataset, ensuring a datetime64 date column, computing the max date and a time delta, and formatting dates as year-month-day strings.
Learn how to convert a date column to datetime64 in pandas using parse_dates, to_datetime, or type casting, then compute time deltas, extract date parts, and format as strings.
Explore time deltas in pandas: compute differences between datetimes, extract days, store shipping days, and use two_time_delta to offset dates by days or weeks, including leap-year adjustments.
Manipulate date time data in pandas by converting to datetime64, adding a three-week delta to the last date, and deriving weeks from days using assignment and delta operations.
Add a three-week time delta to the time to last date column in the transactions dataframe using assign, creating a week reference by dividing delta days by seven.
Learn how using a date time index enables intuitive time-based slicing in pandas, including year, month, and date ranges, while stressing sorted indices for accurate results.
Explore time series missing data techniques, including forward fill, backfill, and linear interpolation, and compare their impact on sales data and plots.
Analyze missing data in a date-indexed oil price series using forward fill, backfill, and interpolation. Compare their effect on the mean and note holiday gaps and December decline.
Shift a series by a specified number of rows for period comparisons. Compute growth by dividing current sales by the prior row, subtracting one, multiplying by 100, and rounding.
Master diff to compute time-series changes by subtracting a shifted series from the original, enabling daily change, growth, and year-over-year analysis with pandas.
Plot the sum of monthly transactions for Store 47 in 2015 and 2014, grouped by year and month, to reveal year-over-year trends.
Filter store 47 transactions, group by year then month, and use the shift method to create year-prior sales for 2015 versus the prior year with a line plot.
Master time series aggregation by comparing group by with resampling to create a continuous date index, fill gaps, and compute monthly sums using year and month grouping.
Explore resampling techniques to compute monthly and yearly averages through aggregation with the series resample method to generate smooth oil price charts and reveal trends.
Resample the date-indexed dataframe to weekly, monthly, and annual averages and plot the results, noting missing values are ignored in the computation.
Explore rolling aggregations and rolling averages to smooth time series, reveal trends, and reduce noise with various windows like two-day and monthly moving averages.
Compute a 90-day rolling average of store 47 transactions using pandas, then plot the smoothed series to reduce daily noise.
Master time series analysis in pandas using datetime64 and to_datetime. Extract date components, slice with datetime indices, and apply rolling, resampling, and moving averages for time intelligence.
Learn to import and preprocess data with pandas read_csv, handle headers and duplicate columns, manage missing values and data types, and set an index for Excel and SQL sources.
Select a date column as the dataframe index using the index argument and parse_dates for a date time index, then usecols to read only the needed columns for efficient analysis.
Select rows with the in rows argument and skip rows when loading a csv to preview data efficiently. Use the values argument to convert missing values to Nan for types.
Use pandas converters to clean data during import, filling missing values with zero and formatting currency with lambda functions; also apply converters to extract year parts from dates.
Streamline the transactions data workflow by reading a csv, renaming columns to date, store number, and transaction count, skipping the first row, and chaining assign to create the analysis dataframe.
Import and preprocess data with pandas read_csv, parse dates, optimize dtypes, and create target percent and day of week columns to produce a compact, analysis-ready dataframe.
Parse dates with parse_dates and infer date time format to date time; cast sales to int32 and sales one to int64; parse date columns and set date time index.
Learn to read text files with pandas using the correct delimiter in read_csv, and to read, select sheets, and concatenate Excel data with read_excel and concat, handling ignore_index.
Export data frames to flat files using to_csv and to_excel, choosing csv, tab-delimited text, or multi-sheet excel writes for organized sharing.
Export the modified transactions data to an Excel workbook with one sheet per year (2013–2017), or produce a CSV per year if Excel is not available.
Set up an Excel writer, loop through 2013–2017, filter by year, and write each year’s data to a sheet named after year, with a csv export using f-strings in pandas.
Connect to SQL databases from Python using SQLAlchemy, create_engine, and pandas read_sql to load dataframes and to_sql for writing.
Learn how pandas reads and writes json, feather, html, pickle, and Python dictionaries, and use read_html to extract a Wikipedia gdp table for cleaning and plotting by state.
Explore how Pandas reads and writes csv and Excel files, preprocesses data during import to save memory, and builds dataframes from SQL queries via SQLAlchemy.
Learn how to combine Pandas data frames by joining on related fields and appending rows, and understand join types and when to use single or multiple keys.
Master how to append and join data frames in pandas by stacking rows with identical columns and adding columns via a shared key, using concat and index management.
Learn to append and combine data frames from multiple files or sheets, using Python to merge 2014 and 2015 transactions into a single dataframe, with Excel and CSV options.
Learn to append data frames with pandas by reading csv and excel files, dropping a useless column, and concatenating 2014 and 2015 data into a clean, unified frame.
Join data frames horizontally with the merge method, matching rows on shared columns or index, using a left and right frame and selecting the appropriate join type.
Explore inner, left, right, and outer joins in pandas merges, and see how left joins preserve all left table rows while matching right rows and filling unmatched values with nan.
Learn how inner joins merge tables on date, compare row counts, and identify when to switch to left joins using pandas merge with left_on and right_on for explicit joins.
Explore left joins in pandas to preserve all left table rows, compare with inner joins, and understand data loss and nan values in time series like transactions and oil.
Join the retail dataframe and stores dataframe, plot total sales by city, mean sales by type over time, and a stacked bar chart of monthly average daily sales by type.
Merge retail and stores data frames on store number, and explore sales visualization with pivot tables, stacked charts, and mean sales by month and type.
Compare the join method with merge for joining two data frames by index, showing how merge can join on index or columns and is the preferred approach.
Combine data frames in pandas using the con function to stack and the merge method to join, performing left, inner, right, and outer joins, while monitoring join shapes.
This is a hands-on, project-based course designed to help you master two of the most popular Python packages for data analysis and business intelligence: NumPy and Pandas.
We'll start with a NumPy primer to introduce arrays and array properties, practice common operations like indexing, slicing, filtering and sorting, and explore important concepts like vectorization and broadcasting.
From there we'll dive into Pandas, and focus on the essential tools and methods to explore, analyze, aggregate and transform series and dataframes. You'll practice plotting dataframes with charts and graphs, manipulating time-series data, importing and exporting various file types, and combining dataframes using common join methods.
Throughout the course you'll play the role of Data Analyst for Maven Mega Mart, a large, multinational corporation that operates a chain of retail and grocery stores. Using the Python skills you learn throughout the course, you'll work with members of the Maven Mega Mart team to analyze products, pricing, transactions, and more.
COURSE OUTLINE:
Intro to NumPy & Pandas
Introduce NumPy and Pandas, two critical Python libraries that help structure data in arrays & DataFrames and contain built-in functions for data analysis
Pandas Series
Introduce Pandas Series, the Python equivalent of a column of data, and cover their basic properties, creation, manipulation, and useful functions for analysis
Intro to DataFrames
Work with Pandas DataFrames, the Python equivalent of an Excel or SQL table, and use them to store, manipulate, and analyze data efficiently
Manipulating Python DataFrames
Aggregate & reshape data in DataFrames by grouping columns, performing aggregation calculations, and pivoting & unpivoting data
Basic Python Data Visualization
Learn the basics of data visualization in Pandas, and use the plot method to create & customize line charts, bar charts, scatterplots, and histograms
MID-COURSE PROJECT
Put your skills to the test with a brand new dataset, and use your Python skills to analyze and evaluate a new retailer as a potential acquisition target for Maven MegaMart
Analyzing Dates & Times
Learn how to work with the datetime data type in Pandas to extract date components, group by dates, and perform time intelligence calculations like moving averages
Importing & Exporting Data
Read in data from flat files and apply processing steps during import, create DataFrames by querying SQL tables, and write data back out to its source
Joining Python DataFrames
Combine multiple DataFrames by joining data from related fields to add new columns, and appending data with the same fields to add new rows
FINAL COURSE PROJECT
Put the finishing touches on your project by joining a new table, performing time series analysis, optimizing your workflow, and writing out your results
Join today and get immediate, lifetime access to the following:
13+ hours of high-quality video
Python NumPy & Pandas PDF ebook (350+ pages)
Downloadable project files & solutions
Expert support and Q&A forum
30-day Udemy satisfaction guarantee
If you're a data analyst, data scientist, business intelligence professional or data engineer looking to add Pandas to your Python skill set, this course is for you.
Happy learning!
-Chris Bruehl (Python Expert & Lead Python Instructor, Maven Analytics)
__________
Looking for our full business intelligence stack? Search for "Maven Analytics" to browse our full course library, including Excel, Power BI, MySQL, Tableau and Machine Learning courses!
See why our courses are among the TOP-RATED on Udemy:
"Some of the BEST courses I've ever taken. I've studied several programming languages, Excel, VBA and web dev, and Maven is among the very best I've seen!" Russ C.
"This is my fourth course from Maven Analytics and my fourth 5-star review, so I'm running out of things to say. I wish Maven was in my life earlier!" Tatsiana M.
"Maven Analytics should become the new standard for all courses taught on Udemy!" Jonah M.