flatten icon indicating copy to clipboard operation
flatten copied to clipboard

support better sorting of flattened columnames

Open djdeejay opened this issue 8 years ago • 1 comments

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 avatar Oct 13 '17 10:10 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?

amirziai avatar Oct 13 '17 17:10 amirziai