Hello team, question on using YAML anchors: I have...
# questions
s
Hello team, question on using YAML anchors: I have a bunch of columns that repeat across datasets, eg.:
Copy code
_year_cols: &year_cols
      '2015':
        pandas_dtype: float64
      '2016':
        pandas_dtype: float64
      '2017':
        pandas_dtype: float64
      '2018':
        pandas_dtype: float64
      '2019':
        pandas_dtype: float64
      '2020':
        pandas_dtype: float64
I want to use this with other columns but when I do something like this:
Copy code
cvm_volume:
  type: ExcelDataset
  filepath: testpath.xlsx
  validate_on_load: false
  validate_on_save: false
  schema:
    columns:
        '2035':
          pandas_dtype: float64
         <<: *year_cols
The order isnt maintained. Iv had to create a new anchor just for that one variable to maintain it. Wondering if theres a workaround im missing perhaps?
n