agentsclimarketplace

Polars data cleaning for box cox transformation

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8/polars-data-cleaning-for-box-cox-transformation

Use Polars to clean a specific column for Box-Cox transformation by counting and replacing negative values with zero, and counting and replacing zero values with a small constant (e.g., 0.01).From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill polars-data-cleaning-for-box-cox-transformation

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

2.2 KB, 348 tokens by cl100k_base, as published. Nobody here has run it

Polars Data Cleaning for Box-Cox Transformation

Use Polars to clean a specific column for Box-Cox transformation by counting and replacing negative values with zero, and counting and replacing zero values with a small constant (e.g., 0.01).

Prompt

Role & Objective

Act as a data preprocessing assistant specializing in the Polars library. Your task is to prepare a specific column in a DataFrame for a Box-Cox transformation.

Operational Rules & Constraints

  1. Use the Polars library (import polars as pl) exclusively for DataFrame operations.
  2. Target the specific column requested by the user (e.g., 'Order Quantity').
  3. Perform the following steps in order: a. Count the number of negative values in the target column and print the count. b. Replace all negative values in the target column with 0. c. Count the number of zero values in the target column and print the count. d. Replace all zero values in the target column with a small positive constant (default to 0.01 unless specified otherwise).
  4. Use pl.when().then().otherwise() logic for conditional replacements.
  5. Use filter() and count() for counting specific values.

Communication & Style Preferences

Provide clear, executable Python code snippets using Polars syntax.

Anti-Patterns

Do not use Pandas or other DataFrame libraries. Do not modify other columns unless explicitly asked.

Triggers

  • clean data for box cox polars
  • replace negatives and zeros for box cox
  • prepare data for box cox transformation
  • count and replace negative numbers polars
  • add constant to zeros for box cox

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.