Tools & Platforms
pandas (Python Library)
In shortpandas is an open-source Python library for loading, cleaning, merging and summarising tables of data, built around the DataFrame.
pandas is a free, open-source Python library for working with tables of data. It loads spreadsheets, CSV exports and API responses into a structure called a DataFrame, then lets you filter, clean, merge, group and summarise them in a few lines of code. For SEOs and marketers it is the step between having an export and having an answer, and it appears in most MLforSEO notebooks.
How it works
The two core objects are the Series (a single column of values with an index) and the DataFrame (a table of named columns, much like one sheet in a spreadsheet). The operations you will use most:
- read_csv and read_excel to load data, and to_csv to save results.
- Filtering rows, for example queries above an impressions threshold.
- groupby to aggregate, for example clicks by landing page, folder or cluster.
- merge to join two tables on a shared column, for example crawl data and Search Console data on URL.
- Handling missing values, cleaning text with string methods, and resampling dates for time series.
It is conventionally imported with import pandas as pd. Google Colab comes with pandas preinstalled, which is why our notebooks usually start with that line and go straight to uploading a CSV. As of October 2026 the current release is pandas 3.1. Version 3.0 made a dedicated string data type and Copy-on-Write behaviour the defaults, so some older snippets may behave differently or show warnings.
How it’s used in SEO and marketing
- Keyword mapping: our fuzzy matching tutorials read seed and match keyword CSVs into DataFrames, score every pair and export the best matches.
- Redirect mapping: the fuzzy matching guide recommends a pandas plus RapidFuzz merge in place of the unmaintained Fuzzy Pandas library.
- Google Trends: the PyTrends guide turns keyword suggestions, interest over time and trending searches into DataFrames.
- Keyword research outputs: autocomplete suggestions and KeyBERT keyphrases are collected into DataFrames and exported for Google Sheets or Data Studio.
- Preparing data for machine learning: cleaning and shaping tables before they go into scikit-learn models.
Example
You export Search Console performance by page and a crawl with status codes and word counts. In pandas you load both with read_csv, merge them on the URL column, keep indexable pages with a 200 status, filter to pages with high impressions and low CTR, group by folder to see which section holds the most opportunity, and save the shortlist with to_csv. The same work in a spreadsheet means lookups and pivot tables rebuilt by hand every month; in a notebook you rerun it on the new exports.
Limitations and things to watch
- Data has to fit in memory. Very large log files or exports need reading in chunks, or tools such as Polars, DuckDB or BigQuery.
- Normalise join keys first. URLs with and without trailing slashes, protocols or parameters will silently fail to match in a merge.
- Behaviour changes between major versions, so note the pandas version a notebook was written for.
- pandas prepares and summarises data; it does not train models. That work happens in libraries such as scikit-learn.
Learn it on MLforSEO
- What Fuzzy Matching Is, and Where It Fits in SEO
- 404 and Redirect Mapping with Fuzzy Matching in Google Colab (Python)
- The Ultimate Guide to PyTrends: the Google Trends API (with Python code examples)
- Different Ways to Map Keywords to Topics with Supervised and Unsupervised ML Approaches
- Introduction to Machine Learning for SEO
Where pandas (Python Library) shows up on MLforSEO
Learn it in a course
Read about it on the blog
Try it yourself
- Coding Script or NotebookSearch Intent Mismatch Audit: Search Console Notebook for Site Architecture
- Code on GitHubSearch intent classification: rule-based, SERP-based and ML methods
- Code on GitHubAutomatically generate meta descriptions with Python: from BERT to LLMs
- Code on GitHubFuzzy matching for SEO
Sources and further reading
Other terms from Tools & Platforms
- Apps ScriptGoogle's cloud-based JavaScript platform for automating Google Sheets and other Workspace apps, often used to…
- BigQueryGoogle Cloud's serverless data warehouse for storing and querying very large datasets with SQL, including Sear…
- Claude (Anthropic)Anthropic's family of large language models and AI assistant, used for writing, analysis, coding and agentic w…
- Data StudioGoogle's free dashboard and reporting tool, renamed back to Data Studio in 2026, used to visualise SEO and ML…
- ElasticsearchAn open-source search and analytics engine for indexing large amounts of text, with fuzzy, phonetic and vector…
- FuzzyWuzzy/RapidFuzz/PolyFuzzPython libraries for fuzzy string matching. RapidFuzz is the fast default, TheFuzz is FuzzyWuzzy's successor,…
- GensimAn open-source Python library for topic modelling and document similarity, best known for LDA, LSI, word2vec a…
- Google CloudGoogle's cloud computing platform. For SEOs it hosts the ML APIs used most often: Natural Language, Knowledge…
- Google Cloud AutoMLGoogle's tools for training custom models without writing model code; AutoML for text was retired in Vertex AI…



