align_series
Merge multiple CSV files by date into a single wide table, with options for forward-filling and resampling to weekly or monthly periods. Outputs the combined result as a CSV.
Instructions
把本库产出的多份 CSV 按日期对齐合并成一张宽表(默认各取 close 列),支持并集/交集、前向填充、重采样到周(周五)/月(取期末交易日);纯本地计算,不联网。输出写入 file_path 为 CSV。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fill | No | Forward-fill value columns after join (leading NaN stays NaN) | none |
| align | No | Join on date: outer (union, missing = NaN) or inner (intersection) | outer |
| names | No | Output column name per input file, aligned with file_paths; default file name stem | |
| columns | No | Value column per input file, aligned with file_paths; default close for each | |
| resample | No | Per-series resample before join: week (W-FRI) or month; keeps each period's last actual trading day | none |
| file_path | Yes | Output CSV file path | |
| file_paths | Yes | Input CSV paths (>= 2) produced by this library; first column must be date/datetime/日期 |