Thinking global, living local

How to use india-trade-export-analysis: read India's 2020-2023 export data and the high-growth shortlist

October 27, 2026

A set of pandas scripts, CSV results and markdown write-ups on India's commodity exports from TradeStat, with a shortlist of fast-growing export lines. You can explore the committed results without the raw data. The repository is archived and read-only. Trade analysis, not investment advice.

Open-Source Tools · How-To · Policy analysis

How to use india-trade-export-analysis: read India's 2020-2023 export data and the high-growth shortlist

Skip to article content
Text Size

Revised · v1.0.0 · what changed

14,980commodity rows in the extended CSV
US$ 437.7 bntotal exports 2023 (data row)
+50.0%total exports 2020 to 2023
293commodities on the opportunity shortlist

Code: github.com/herrrickshaw/india-trade-export-analysis

Watch the walkthrough

Watch on YouTube: youtu.be/_tfs7QhKoTc

Why it is useful

  • Who benefits: students and trade analysts who want a ready commodity-level export table (HS code, 2020 value, 2023 value, growth) without downloading TradeStat themselves.
  • What it replaces: the first day of cleaning TradeStat spreadsheets. The results are already in CSV and JSON.
  • Evidence from our run: we loaded the committed 14,980-row CSV in pandas and recovered the headline totals, US$291.8 bn in 2020 and US$437.7 bn in 2023.
  • Evidence of limits: the line items sum to US$460.5 bn, about 5% more than the total row, so the table is not a clean partition of exports.
  • The scripts need raw TradeStat Excel files that are not in the repository, so they could not be re-run.

What it is for

The repo's Python scripts read TradeStat Excel exports, compute growth between 2020 and 2023, project 2025 and 2026 by extending that growth, and classify commodities as mega-growth, high-value growing or emerging opportunity. Markdown write-ups discuss reserves, tax and debt. The README describes it as indicative analysis from public sources, not official statistics.

This guide shows how to explore the committed outputs. It is trade analysis for learning, not investment or business advice. The repository is archived (read-only).

Who it is for

  • Students of international trade and Indian export structure
  • Analysts who want a starting commodity table to verify against the official source
  • Anyone learning how a growth-and-projection screen is built, and where it breaks
Not for.
  • Investment or trading decisions
  • Citing the 2025-2026 projections: they extend one historical growth rate
  • Treating the 'opportunity' shortlist as a recommendation without checking classification changes

What you need

RequirementWhyHow to get it
Python 3 with pandasto read the CSV and JSON filespip install pandas in a virtual environment
TradeStat export workbooks (optional)the scripts read them from a hard-coded Downloads pathdownload from the official TradeStat portal and edit the paths; we did not do this
Not neededno API key or GPUthe committed results are enough to explore

Get the code and an AI assistant

You do not have to be a programmer. Get the repository, give it to an AI assistant, and ask in plain language. Any of these routes works:

ToolWhat you needBest for
GitHubFree account to fork or star; git to clone, or the green Code button, then Download ZIP, or open in CodespacesGetting the code and keeping up with updates
Claude CodeClaude subscription or API key; run claude inside the cloned folderLetting the AI read and run the whole repo
Gemini CLIGoogle account; run gemini inside the cloned folderThe same hands-on workflow with Gemini
Claude.ai, Gemini or ChatGPT in the browserA chat account; upload README.md and the files you care about (or paste the output of git ls-files)Understanding the project and asking questions without installing anything
Other tools (Copilot Chat, Cursor, Codex CLI)Open the cloned folder in the tool and point it at README.md firstEditing and extending the code
git clone https://github.com/herrrickshaw/india-trade-export-analysis.git
cd india-trade-export-analysis
claude      # or: gemini

Install

  1. Get the code
    git clone https://github.com/herrrickshaw/india-trade-export-analysis.git
    cd india-trade-export-analysis
  2. Make a virtual environment and install pandas
    python3 -m venv .venv
    .venv/bin/pip install pandas

Quick start: commands and what you should see

Load the extended table and read the totals

.venv/bin/python -c "import pandas as pd; d=pd.read_csv('EXTENDED_ANALYSIS_2020_2026.csv'); print(d.shape); print(d.iloc[0])"

14,980 rows and 7 columns; the first row is India's total export with values for 2020 and 2023 in US$ million.

Count the opportunity classes

.venv/bin/python -c "import pandas as pd; print(pd.read_csv('HIGH_OPPORTUNITY_EXPORTS.csv').Opportunity.value_counts())"

Three classes with 246, 41 and 6 commodities.

Run a script (needs raw data)

.venv/bin/python export_opportunities.py

Without the TradeStat workbooks and Downloads folder it cannot run. We did not run it.

Sample outputs

Real output from a run on the date shown in the sources line; trimmed to fit.

Totals versus the sum of line items

python3 -I (pandas, EXTENDED_ANALYSIS_2020_2026.csv)
total row 2020: 291808.48  2023: 437704.58 (USD mn)
sum of 14,979 line items, 2023: 460,482.7 (USD mn)
total row 2023: 437,704.6 (USD mn)

The total row and the line items disagree by about US$22.8 bn (5%). Do not add the total row to the line items.

Opportunity classes

HIGH_OPPORTUNITY_EXPORTS.csv, value_counts of Opportunity
Opportunity
EMERGING_OPPORTUNITY    246
HIGH_VALUE_GROWING       41
MEGA_GROWTH               6
(293 rows)

The 293 rows include the all-India total row.

The six mega-growth lines (first five shown)

MEGA_GROWTH_EXPORTS.csv, values rounded
Commodity (HS code)                      2020 $M   2023 $M   growth
Automotive diesel (27101944)               8,800.8  19,455.9   121.1%
Aviation turbine fuel (27101939)             430.1  15,202.7  3435.0%
Motor gasoline (27101241)                  3,645.8  10,502.9   188.1%
Aeroplanes >15,000 kg (88024000)             115.8   5,544.5  4689.3%
Motor cars 1000-1500cc (87032291)          1,983.8   5,098.6   157.0%

Aviation fuel (+3,435%) and aircraft (+4,689%) start from very small 2020 bases; a change in HS classification or one large delivery could explain this, which the repo does not test. The column is labelled 5-year growth but compares 2020 with 2023.

Ways to use it

MethodHow it works
Explore in a notebookOpen the CSVs in pandas and filter by HS code or growth.
Verify against TradeStatPick five shortlisted lines and compare the 2020 and 2023 values with the official portal.
Rebuild with current dataUse the scripts as a template with your own newer TradeStat downloads.

Sample prompts for your AI assistant

Copy, paste and edit the parts in [brackets].

  • Read README.md and export_opportunities.py and explain how a commodity becomes MEGA_GROWTH.
  • Load EXTENDED_ANALYSIS_2020_2026.csv, drop the total row, and list the top 10 HS codes by 2023 value.
  • Check whether the large growth rates in HIGH_OPPORTUNITY_EXPORTS.csv come from tiny 2020 bases and flag them.
  • Explain why the line items sum to more than the India's Total Export row and suggest a fix.
  • Adapt export_extended_analysis.py to take a folder path as an argument instead of ~/Downloads.

Limits and honest caveats

  • Scripts depend on raw TradeStat workbooks and hard-coded personal Downloads paths that are not in the repository; we could not re-run them.
  • Line items sum to US$460.5 bn against a US$437.7 bn total row (5% gap).
  • Projections to 2025 and 2026 repeat the 2020-2023 growth rate (the total row shows the same 50.0% again), so they are extrapolation, not a forecast.
  • Growth labelled 5-year covers 2020 to 2023; very large percentages come from small bases.
  • Indicative analysis from public sources, not official statistics, not investment advice. The repository is archived.

Sources: Repository herrrickshaw/india-trade-export-analysis (archived), committed CSV/JSON files read with pandas on 2026-10-23 in a throwaway virtual environment; the Python scripts were not run because their input workbooks are absent.

Revision history.
  • v1.0.0 — 23 October 2026 — first published.

About this article: Researched, written and edited by Umashankar Triplicane Dwarakanathan, with AI research assistance; every figure is meant to trace to the primary source cited. See the Editorial Policy for how sourcing, AI use and corrections work.

Umashankar Triplicane Dwarakanathan
Contact Us
Umashankar Triplicane Dwarakanathan
Investment Promotion & Energy-Sector Leader · Chennai, Tamil Nadu, India
LinkedIn → GitHub → Email +91 78273 81696
How this site works

Data-led analysis of India's trade, currency and industrial policy. Every article is built from primary official sources, and every figure links back to the release, table or filing it came from.

Sources. DGCI&S TradeStat (imports/exports, HSN-wise) · PIB (government press releases, January 2017 to today, refreshed daily) · RBI (circulars, balance of payments) · MoSPI (CPI/WPI, IIP) · PARIVESH (environmental clearances) · CCIL (bond yields) · BIS (policy rates) · SEBI, NSE/BSE and SEC filings for company data.

Interpretation. Figures carry their vintage and retrieval date; estimates and press-reported numbers are labelled as such; where sources disagree, both are shown. Corrections are made visibly, never silently. Articles are written with AI assistance from the cited sources — AI-generated text can misstate figures even when working from real material, so verify any number that matters to a decision against the linked primary source.

footer

Browse all articles by topic

Every piece on this blog, grouped. Or read the full index.

Agriculture & FertilisersAI ToolsChemicalsClimate & CarbonEnergy & FuelsGas & LNGImport SubstitutionIndustrial PolicyMarkets & FinanceMobility & EVPrices & InflationTextilesTrade & Tariffs

Each topic is a live archive page that updates itself as pieces are labelled. It replaces a hand-kept list that had fallen 18 articles behind.