---
name: usda-ers-feed-grains-ingestion
description: "How to get USDA ERS Feed Grains Database data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load USDA feed-grain history into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/usda-ers-feed-grains
Provider: https://www.ers.usda.gov/data-products/feed-grains-database
Checked against the provider's documentation: 2026-11-01

## Access
- No account or key. The all-years CSV is a public download.
- The CSV is about 16.5 MB on the checked product page.

## Request
```bash
curl -O 'https://www.ers.usda.gov/media/5766/feed-grains-yearbook-tables-all-years.csv?v=97927'
```

## Format
Long-form CSV with table_group, table_name, commodity_group, commodity, attribute, geography, year, frequency, timeperiod, unit and amount.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""USDA ERS Feed Grains all-years CSV -> pandas -> Parquet. No key."""
import io
import requests
import pandas as pd

URL = "https://www.ers.usda.gov/media/5766/feed-grains-yearbook-tables-all-years.csv?v=97927"
r = requests.get(URL, timeout=60)
r.raise_for_status()
df = pd.read_csv(io.BytesIO(r.content))
df.to_parquet("usda_ers_feed_grains_all_years.parquet", index=False)
print(len(df), "rows", df["year"].min(), "to", df["year"].max(),
      df["commodity"].nunique(), "commodities")
```
Run by us on 2026-11-01 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 81346 rows 1866 to 2026 80 commodities

## Limits
- Rate limit: Not stated.
- The all-years CSV was listed as 16.52 MB when checked.
- The former custom-query application and associated CSV were discontinued in May 2025.

## Quirks
- frequency and timeperiod must be retained because series use monthly, quarterly, annual and differing marketing-year calendars.
- Latest values may be preliminary or projected.
- Missing values can represent unreported observations, discontinued series or data not yet released.

## Terms and attribution
- No separate data licence is stated on the checked product pages.
- The product page states no separate licence for the downloadable files.
- Terms page: https://www.ers.usda.gov/data-products/feed-grains-database

## Sources
- https://www.ers.usda.gov/data-products/feed-grains-database/feed-grains-yearbook-tables: "Data are monthly, quarterly, and/or annual depending upon the data series."
- https://www.ers.usda.gov/data-products/feed-grains-database/feed-grains-yearbook-tables: "Latest data may be preliminary or projected."
- https://www.ers.usda.gov/data-products/feed-grains-database/documentation: "the Feed Grains Yearbook Tables—Historical data set generally covers a longer time period (1866–present)."

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
