imarina_mapper¶
imarina_mapper ¶
unparse_researcher_to_imarina_row ¶
Writes a Researcher's fields into row 0 of a single-row Excel, using the iMarina column names.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data | Researcher | The researcher whose fields are written out. | required |
empty_output_row | Excel | A one-row | required |
Source code in source/src/imarina_load_researchers/core/imarina_mapper.py
parse_imarina_row_data ¶
Converts one row of the previous iMarina load into a Researcher.
Unlike a3_mapper.parse_a3_row_data, this reads an already-iMarina-format row, so no dictionary translation is applied - values are read, typed and normalized (dates sanitized, numeric IDs stringified, names normalized) but not translated.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
row | Series | A row from the previous iMarina load's dataframe, indexed by | required |
Returns:
| Name | Type | Description |
|---|---|---|
Researcher | Researcher | The researcher parsed from this row. |
Source code in source/src/imarina_load_researchers/core/imarina_mapper.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | |
append_researchers_to_output_data ¶
Appends one output row per researcher onto the output Excel, in place.
Builds a single empty (all-None) template row from output_data's own columns, then for each researcher fills a fresh copy of that row via unparse_researcher_to_imarina_row and concatenates it onto output_data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
researchers | list[Any] | The | required |
output_data | Any | The output | required |