@@ -23,10 +23,20 @@ def excel_reader_single_sheet() -> fastexcel.ExcelReader:
2323def expected_column_info () -> list [fastexcel .ColumnInfo ]:
2424 return [
2525 fastexcel .ColumnInfo (
26- name = "Month" , index = 0 , column_name_from = "looked_up" , dtype = "float" , dtype_from = "guessed"
26+ name = "Month" ,
27+ index = 0 ,
28+ absolute_index = 0 ,
29+ column_name_from = "looked_up" ,
30+ dtype = "float" ,
31+ dtype_from = "guessed" ,
2732 ),
2833 fastexcel .ColumnInfo (
29- name = "Year" , index = 1 , column_name_from = "looked_up" , dtype = "float" , dtype_from = "guessed"
34+ name = "Year" ,
35+ index = 1 ,
36+ absolute_index = 1 ,
37+ column_name_from = "looked_up" ,
38+ dtype = "float" ,
39+ dtype_from = "guessed" ,
3040 ),
3141 ]
3242
@@ -117,27 +127,44 @@ def single_sheet_with_unnamed_columns_expected() -> dict[str, list[Any]]:
117127def sheet_with_unnamed_columns_expected_column_info () -> list [fastexcel .ColumnInfo ]:
118128 return [
119129 fastexcel .ColumnInfo (
120- name = "col1" , index = 0 , column_name_from = "looked_up" , dtype = "float" , dtype_from = "guessed"
130+ name = "col1" ,
131+ index = 0 ,
132+ absolute_index = 0 ,
133+ column_name_from = "looked_up" ,
134+ dtype = "float" ,
135+ dtype_from = "guessed" ,
121136 ),
122137 fastexcel .ColumnInfo (
123138 name = "__UNNAMED__1" ,
124139 index = 1 ,
140+ absolute_index = 1 ,
125141 column_name_from = "generated" ,
126142 dtype = "float" ,
127143 dtype_from = "guessed" ,
128144 ),
129145 fastexcel .ColumnInfo (
130- name = "col3" , index = 2 , column_name_from = "looked_up" , dtype = "string" , dtype_from = "guessed"
146+ name = "col3" ,
147+ index = 2 ,
148+ absolute_index = 2 ,
149+ column_name_from = "looked_up" ,
150+ dtype = "string" ,
151+ dtype_from = "guessed" ,
131152 ),
132153 fastexcel .ColumnInfo (
133154 name = "__UNNAMED__3" ,
134155 index = 3 ,
156+ absolute_index = 3 ,
135157 column_name_from = "generated" ,
136158 dtype = "float" ,
137159 dtype_from = "guessed" ,
138160 ),
139161 fastexcel .ColumnInfo (
140- name = "col5" , index = 4 , column_name_from = "looked_up" , dtype = "string" , dtype_from = "guessed"
162+ name = "col5" ,
163+ index = 4 ,
164+ absolute_index = 4 ,
165+ column_name_from = "looked_up" ,
166+ dtype = "string" ,
167+ dtype_from = "guessed" ,
141168 ),
142169 ]
143170
@@ -497,26 +524,30 @@ def test_use_columns_with_column_names() -> None:
497524 name = "__UNNAMED__0" ,
498525 column_name_from = "generated" ,
499526 index = 0 ,
527+ absolute_index = 0 ,
500528 dtype = "float" ,
501529 dtype_from = "guessed" ,
502530 ),
503531 fastexcel .ColumnInfo (
504532 name = "bools_renamed" ,
505533 index = 1 ,
534+ absolute_index = 1 ,
506535 dtype = "boolean" ,
507536 dtype_from = "guessed" ,
508537 column_name_from = "provided" ,
509538 ),
510539 fastexcel .ColumnInfo (
511540 name = "dates_renamed" ,
512541 index = 2 ,
542+ absolute_index = 2 ,
513543 dtype = "datetime" ,
514544 dtype_from = "guessed" ,
515545 column_name_from = "provided" ,
516546 ),
517547 fastexcel .ColumnInfo (
518548 name = "__UNNAMED__3" ,
519549 index = 3 ,
550+ absolute_index = 3 ,
520551 dtype = "float" ,
521552 dtype_from = "guessed" ,
522553 column_name_from = "generated" ,
0 commit comments