flatten
flatten copied to clipboard
support better sorting of flattened columnames
Hi, nice work, btw i would like to request adding an formatstring for bulding new keynames as it happens (when sorting the columns in Pandas) stuff like this: key_10_name, key_11_name, key_1_name, key_2_name .... with
for index, item in enumerate(object_):
_flatten(item, _construct_key(key, separator, '{:02d}'.format(index)))
the formatstring could be a parameter, or configurationattribute
the keys would look like this key_01_name, key_02_name,, ...., , key_10_name, key_11_name
regards djdeejay
@djdeejay Makes sense. Since you've done the work do you want to raise a PR and show that it works with a test?