Hello! Based on your _lc_genre_mapping_csv.txt and my own list of DDC headings, you I've written a template function to calculate nested DDC headings from DDC codes (see attached screenshot). The difference is that instead of including each sublevel in the list, the function calculates the nested levels from the superior decimal codes. You can find the template function attached, I hope you find it useful!
Of course, to view it you must add a custom column with that template function:
ddc_head.py