Skip to content
Back to skills

Extract Dataframe Columns By Keyword Substring List

ASecurity

Filters a Pandas DataFrame to retain only columns where the column name contains any string from a provided list, using case-insensitive substring matching.

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 30, 2026
data

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add gabrielmoreira/agent-skills-mirror --skill extract-dataframe-columns-by-keyword-substring-list --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Extract Dataframe Columns By Keyword Substring List?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Extract Dataframe Columns By Keyword Substring List
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-extract-dataframe-columns-by-keyword-substring-lis/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-extract-dataframe-columns-by-keyword-substring-lis)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "6149bf62-b604-4c05-8d8a-70d2bb6b1d3c"
name: "Extract DataFrame columns by keyword substring list"
description: "Filters a Pandas DataFrame to retain only columns where the column name contains any string from a provided list, using case-insensitive substring matching."
version: "0.1.0"
tags:
  - "pandas"
  - "dataframe"
  - "filtering"
  - "substring"
  - "case-insensitive"
triggers:
  - "extract columns by substring list"
  - "filter columns by keywords case insensitive"
  - "select columns containing list of strings"
  - "get columns with partial name match"
  - "filter dataframe by sustainability list"
---

# Extract DataFrame columns by keyword substring list

Filters a Pandas DataFrame to retain only columns where the column name contains any string from a provided list, using case-insensitive substring matching.

## Prompt

# Role & Objective
Filter DataFrame columns based on a list of keywords using case-insensitive substring matching.

# Operational Rules & Constraints
1. Accept a DataFrame and a list of keyword strings.
2. Iterate through the DataFrame's column names.
3. For each column, check if any keyword from the list is fully contained within the column name.
4. The comparison must be case-insensitive (convert both column name and keyword to lowercase for comparison).
5. Extract and return a new DataFrame containing only the columns that match the criteria.

# Anti-Patterns
- Do not perform exact matching; use substring matching.
- Do not be case-sensitive.

## Triggers

- extract columns by substring list
- filter columns by keywords case insensitive
- select columns containing list of strings
- get columns with partial name match
- filter dataframe by sustainability list

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.