# Python: Combine Monthly Sales Exports into One Quarter

> A beginner Python walkthrough in the free Google Colab: label three monthly exports, stack them into one quarter with pandas concat and total by month…

Source: https://learn.ynteractive.com/content/python-combine-exports · Updated 2026-10-24 · Free from Stepthrough (https://learn.ynteractive.com)

## Practice it step by step

[Start the free practice](https://learn.ynteractive.com/modules/python-combine-exports)

[Take the free module: why it matters, practice and a quick check →](https://learn.ynteractive.com/courses/python-for-spreadsheet-work/2)

You do every step yourself in a practice copy of Google Colab. It checks your work as you go, and “Do it for me” finishes any step you get stuck on. Free, about 12 minutes, and nothing touches your real accounts. [Open full screen](https://learn.ynteractive.com/modules/python-combine-exports)

Free · Live now · [Python](https://learn.ynteractive.com/content/course/python) · [Google Colab](https://learn.ynteractive.com/content/tool/google-colab) · ~12 min · 11 steps · Beginner

Updated October 24, 2026. Built against the tool’s current screens and checked step by step. [How we check this lesson](https://learn.ynteractive.com/content/about#how-we-check)

A beginner [Python](https://learn.ynteractive.com/content/glossary/python) walkthrough in the free Google Colab: label three monthly exports, stack them into one quarter with [pandas](https://learn.ynteractive.com/content/glossary/pandas) concat and total by month and by customer, typing every line yourself.

## At a glance

| Question | Answer |
| --- | --- |
| What you build | A beginner Python walkthrough in the free Google Colab: label three monthly exports, stack them into one quarter with pandas concat and total by month and by customer, typing every line yourself. |
| Tools | Google Colab |
| Time | About 12 minutes, 11 steps in 3 parts |
| Level | Beginner, no coding needed |
| Cost | Free |
| Ways to learn it | [Practice it step by step](https://learn.ynteractive.com/modules/python-combine-exports) |

### The 3 parts, in short

1. Three monthly exports: July's export, August's export, September's export.
2. Stack them: Label each month, Run it, Stack the three months, Run it.
3. Totals by month and customer: Total each month, Run it, Total each customer, Run it.

**Start here first:** [Python: Total a Sales Export by Customer in Google Colab](https://learn.ynteractive.com/content/python-sales-report) (module 1 of Python)

## What you'll build

The sales system at Lakeside Office Supply (made up) exports one file per month. For the [quarterly review](https://learn.ynteractive.com/content/glossary/quarterly-business-review) someone copies July, August and September under each other in a spreadsheet, fixes the headers that got pasted three times and hopes nothing was skipped. In this lesson you do it in [Google Colab](https://learn.ynteractive.com/content/tool/google-colab) with pandas: three small monthly tables, a month label on each, one line that stacks them, and totals by month and by customer. You type every line yourself.

July $2,110, August $2,950 and September $2,870: $7,930 in all, with Cobalt Legal on top at $3,170. With real files, pd.read_csv loads each month and the rest is the same. Do it in Colab yourself: the lesson page has the checklist.

- Tools: Google Colab
- Time: about 12 minutes, 11 steps in 3 chapters
- Level: beginner, no coding needed
- Price: free

## Practice first, then build it for real

Practice copy built from real Google Colab screens (captured 24 October 2026). Every line of Python in it was typed and run there. Nothing here touches your Google account. Our account shows a PRO badge; everything in the lesson works the same in free Colab. The shop, its customers and its numbers are made up, and the account picture is blurred. To build it for real you need your own Google Colab account, and some services charge once you use them for real work, so check each tool's current pricing.

## Try it yourself, free

Reading the steps is a start. Doing them is how it sticks. The interactive module walks you through every click in a practice copy of Google Colab, checks each step, and never touches your real accounts.

[Start “Python: Combine Monthly Sales Exports into One Quarter”](https://learn.ynteractive.com/modules/python-combine-exports)

## Step by step: Python: Combine Monthly Sales Exports into One Quarter

All 11 steps of the interactive module, in order. In the module you watch each one, then do it yourself in a practice copy that checks your work.

### 1. Three monthly exports

1. **July's export.** Start a new Colab notebook as in module 1 and run **import pandas as pd**. In the new cell, type July's orders as a small table (in real life this line is **pd.read_csv('july.csv')**).
   In a new notebook with pandas loaded, type July's orders as a small table.
2. **August's export.** Press Enter and type August.
   Then August.
3. **September's export.** And September.

### 2. Stack them

4. **Label each month.** Press **Shift+Enter** to run the cell. In the new cell below, give each table a month column, so you can still tell the months apart once they are stacked.
   Run the cell with Shift Enter. In the new cell, give each table a month column, so you can tell them apart later.
5. **Run it.** Press **Shift+Enter**: Colab runs the cell and opens a new empty cell below. (In the practice, click the run button ▶ at the left of the cell.)
   Run it.
6. **Stack the three months.** **pd.concat** stacks tables under each other, like pasting three exports into one sheet but without the repeated headers. **ignore_index=True** numbers the rows 0 to 5 again.
   pd concat stacks the three tables into one, with no repeated headers. Then show it.
7. **Run it.** Press **Shift+Enter**: Colab runs the cell and opens a new empty cell below. (In the practice, click the run button ▶ at the left of the cell.)
   Run it.

### 3. Totals by month and customer

8. **Total each month.** Six orders in one table, each with its month. Total by month; **sort=False** keeps July, August, September in the order they appear instead of A to Z.
   Six orders in one table. Now total each month, in the order they appear.
9. **Run it.** Press **Shift+Enter**: Colab runs the cell and opens a new empty cell below. (In the practice, click the run button ▶ at the left of the cell.)
   Run it.
10. **Total each customer.** July $2,110, August $2,950, September $2,870. Now the same quarter by customer.
    Now the same quarter, by customer.
11. **Run it.** Press **Shift+Enter**: Colab runs the cell and opens a new empty cell below. (In the practice, click the run button ▶ at the left of the cell.)
    Run it.

## Screenshots

[Start this module free](https://learn.ynteractive.com/modules/python-combine-exports)

- Previous in Python: [Python: Total a Sales Export by Customer in Google Colab](https://learn.ynteractive.com/content/python-sales-report)
- Next in Python: [Python: Clean a Messy Invoice Export Before You Total It](https://learn.ynteractive.com/content/python-clean-invoice-export)

## Same business, other tools

Maple Dental shows up in these modules too, built with different tools.

- [Excel for the Web: Find Your Top Customers in a Sales Export](https://learn.ynteractive.com/content/excel-web-top-customers): A beginner Excel for the web walkthrough on real screens: clean a sales export with Remove Duplicates, total every customer with a PivotTable and sort the biggest to…
- [SQL: Build a Monthly Revenue Report from an Orders Table](https://learn.ynteractive.com/content/sql-monthly-revenue-report): A beginner SQL walkthrough in the free DB Fiddle: type a small orders table, then filter it, total it and turn it into revenue by month with GROUP BY, typing every line…
- [SQL: Find Customers Who Have Gone Quiet with a LEFT JOIN](https://learn.ynteractive.com/content/sql-quiet-customers): A beginner SQL walkthrough in the free DB Fiddle: join a customers table to orders, see why a plain JOIN hides customers who never ordered, and list every quiet account…
- [JavaScript: Turn Invoice Dates into Due-Date Reminders](https://learn.ynteractive.com/content/js-due-date-reminders): A beginner JavaScript walkthrough in the free JSFiddle: work out Net 30 due dates, count the days left and list every invoice as due or overdue, typing every line…

## Free cheat sheet

Print it or save the PDF: the key steps and checks from this lesson on one page, free.

- [Python for Spreadsheet Work Cheat Sheet](https://learn.ynteractive.com/content/cheat-sheets/python-spreadsheet-work): A free one-page Python cheat sheet for Google Colab: load pandas, total and rank customers, stack monthly exports and clean messy names and amounts.

[All free printable cheat sheets](https://learn.ynteractive.com/content/cheat-sheets)

## Terms in this lesson

Plain-English definitions, each with an example from a free lesson.

[pandas (Python)](https://learn.ynteractive.com/content/glossary/pandas) · [Python](https://learn.ynteractive.com/content/glossary/python)

[The full AI glossary](https://learn.ynteractive.com/content/glossary)

## Browse related tutorials

[Python (3)](https://learn.ynteractive.com/content/course/python) · [Google Colab tutorials (3)](https://learn.ynteractive.com/content/tool/google-colab)

Want AI working like this in your business? Robert Breen, the instructor behind this lesson, helps small and mid-sized teams put AI assistants, agents and automations to work. [AI consulting for small teams](https://ynteractive.com/)
