BACK TO CLAUDE SKILLS
◈
normalize_price_data
Data PipelineDataUtils
INSTALLATION
$python -c "exec(open('normalize_price_data.py').read())"
#or paste directly into your Claude Code terminal
[ ABOUT ]
Validates that all required OHLCV keys are present in the input dictionary and converts all values to Python floats, which handles string-typed numbers that some APIs return. Raises `ValueError` immediately on missing keys rather than allowing downstream indicator functions to fail with uninformative index errors.
This function is designed as a pipeline boundary validator — it should be called at the point where external API data enters the local processing pipeline. Normalization ensures consistent numeric types across all downstream calculations, preventing subtle bugs that arise when mixing Python int, float, and string representations of the same price value.
[ USAGE EXAMPLE ]
[ FULL CODE ]
[ METADATA ]
CategoryData Pipeline
ComplexityIntermediate
LanguagePython 3.10+
TagsData, Utils
[ ASK CLAUDE ]
Ask AI about this skill before installing it.