SmartQueryTools

Add Moving Average to Arrow Files Online

Add a moving average, rolling sum, rolling min, or rolling max column to Arrow files directly in your browser. Choose window size, order-by column, and optional partitioning — no upload required.

How to add Moving Average to Arrow files

  1. Drop your file onto the upload area. It is loaded into the in-browser engine and the first 200 rows are shown.
  2. Pick a window function: Moving Average (the default), Rolling Sum, Rolling Min or Rolling Max. The output column name changes to match, for example moving_avg or rolling_sum.
  3. Choose the value column (numeric columns only) and the window size in rows. The default is 3, and the window is the current row plus the rows before it.
  4. Choose an Order by column, usually a date, and optionally a Partition by column so each group gets its own series. Click Add Rolling Column.
  5. Check the preview, then download the file in the same format you uploaded.

Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.

Worked example

A café tracks cups of coffee sold each day. Daily figures jump around with the weather, so the owner wants a 3-day moving average to see the underlying trend.

Input (Arrow)

Arrow IPC file (binary, columnar) — shown as a table with its schema

sale_dateweekdaycups_sold
2026-05-04Mon120
2026-05-05Tue150
2026-05-06Wed90
2026-05-07Thu180
2026-05-08Fri210
2026-05-09Sat150

Schema: sale_date DATE, weekday VARCHAR, cups_sold BIGINT

Settings

  • Window function: Moving Average
  • Value column: cups_sold
  • Window size: 3 rows
  • Order by: sale_date
  • Partition by: (none)
  • Output column name: moving_avg

Result

sale_dateweekdaycups_soldmoving_avg
2026-05-04Mon120120
2026-05-05Tue150135
2026-05-06Wed90120
2026-05-07Thu180140
2026-05-08Fri210160
2026-05-09Sat150180

From Wednesday on, each value averages that day and the two before it: Thursday is (150 + 90 + 180) / 3 = 140. Monday and Tuesday do not have two earlier rows, so they average what is available: 120 alone, then (120 + 150) / 2 = 135. They are not left empty. Wednesday's dip is smoothed to 120, and the upward trend from Thursday is easy to see.

Frequently Asked Questions

How are the first rows handled when the window is not full yet?

They use whatever rows are available. With a window of 7, row 1 averages 1 value, row 2 averages 2, and from row 7 on every value covers 7 rows. No row is left empty for this reason.

Is the window centred or trailing?

Trailing. It covers the current row and the rows before it, up to the window size. Centred windows and exponential moving averages are not offered. Use the SQL Query tool with a custom window frame for those.

What is the difference between the four window functions?

Moving Average gives the mean of the window, Rolling Sum the total, and Rolling Min and Rolling Max the smallest and largest values. All four use the same window size, order and partition settings.

Related Tools

Round Numbers in CSV Files Online

Round numeric columns in CSV files to any number of decimal places directly in your browser. Set precision per column with a simple slider — no upload required.

Add Lag / Lead Column to CSV Files Online

Add a LAG or LEAD column to CSV files to shift any column forward or backward by N rows. See previous day's sales, next value in a sequence, or any time-shifted comparison — runs entirely in your browser.

Truncate Dates in CSV Files Online

Truncate date and timestamp columns in CSV files to a chosen precision — year, quarter, month, week, day, hour, or minute — directly in your browser. Rounds timestamps down to the start of each period. No upload required.

Add Moving Average to CSV Files Online

Add a moving average, rolling sum, rolling min, or rolling max column to CSV files directly in your browser. Choose window size, order-by column, and optional partitioning — no upload required.

Add Moving Average to Excel Files Online

Add a moving average, rolling sum, rolling min, or rolling max column to Excel files directly in your browser. Choose window size, order-by column, and optional partitioning — no upload required.

Add Moving Average to Parquet Files Online

Add a moving average, rolling sum, rolling min, or rolling max column to Parquet files directly in your browser. Choose window size, order-by column, and optional partitioning — no upload required.

Add Moving Average to JSON Files Online

Add a moving average, rolling sum, rolling min, or rolling max column to JSON files directly in your browser. Choose window size, order-by column, and optional partitioning — no upload required.

Arrow Viewer Online

View and inspect Arrow files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.