I have a dataset with 5 rows that I wish to merge into one so that I can use them as unique column identifiers. For example
Name Unique No. Summary Nominal Voltage Nominal Voltage Upstream Upstream
NaN NaN Class Upstream Downstream Constraint Oppurtunity
(non unique) NaN NaN NaN NaN Physical Nan
I would like the columns to be named
Name (non unique) Unique No. Summary Class Nominal Voltage Upstream Nominal Voltage Downstream Upstream Constraint Phsyical Upstream Oppurtunity
So the rows (there are actually 5) would be merged (while ignoring NaNs) which I could then use as unique column names.
Thanks in advance.
As far as I can understand, groupby requires something common between the things being grouped, so can't be used here? The whole database is currently of string type because I thought that would make it easier to join them, but I couldn't figure out a way.