Agent skill
data-pipeline-processor-example-1-simple-csv-processing
Sub-skill of data-pipeline-processor: Example 1: Simple CSV Processing (+3).
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/development/data-pipeline-processor/example-1-simple-csv-processing
SKILL.md
Example 1: Simple CSV Processing (+3)
Example 1: Simple CSV Processing
# Process CSV with config
python -m data_pipeline config/pipelines/clean_data.yaml
# Override input/output
python -m data_pipeline config/pipelines/clean_data.yaml \
--input data/custom_input.csv \
--output data/custom_output.csv
# Dry run (validate only)
python -m data_pipeline config/pipelines/clean_data.yaml --dry-run
Example 2: Programmatic Usage
from data_pipeline import DataPipeline, PipelineConfig
config = PipelineConfig(
input_path='data/raw/sales.csv',
output_path='data/processed/sales_clean.csv',
validation={
'required_columns': ['date', 'product', 'amount'],
'non_null_columns': ['amount']
},
transformations=[
{'operation': 'filter', 'expression': 'amount > 0'},
{'operation': 'sort', 'by': ['date']}
]
)
pipeline = DataPipeline(config)
result = pipeline.run()
print(f"Processed {result['output_rows']} rows")
Example 3: Batch Processing
from pathlib import Path
from data_pipeline import DataReader, DataTransformer, DataExporter
reader = DataReader()
exporter = DataExporter()
# Process all CSV files in directory
input_dir = Path('data/raw/')
output_dir = Path('data/processed/')
for csv_file in input_dir.glob('*.csv'):
df = reader.read(str(csv_file))
# Apply transformations
df_clean = (DataTransformer(df)
.fill_nulls(value=0)
.filter_rows('value > 0')
.sort(['timestamp'])
.get_result())
# Export
output_path = output_dir / csv_file.name
exporter.to_csv(df_clean, str(output_path))
print(f"Processed: {csv_file.name}")
Example 4: Multi-Format Export
def export_all_formats(df: pd.DataFrame, base_path: str):
"""Export data to multiple formats."""
exporter = DataExporter()
outputs = {
'csv': exporter.to_csv(df, f"{base_path}.csv"),
'json': exporter.to_json(df, f"{base_path}.json"),
'parquet': exporter.to_parquet(df, f"{base_path}.parquet"),
'excel': exporter.to_excel(df, f"{base_path}.xlsx")
}
return outputs
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?