agentsclimarketplace

Extract dataframe columns by keyword substring list

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8/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.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill extract-dataframe-columns-by-keyword-substring-list

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.7 KB, 215 tokens by cl100k_base, as published. Nobody here has run it

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.