I have a dataframe called df
and want to create a list of tuples inside tuple like the one shown below.
dataframe:
Expected output:
[(('AK', 'Alaska Bible College'), 53.30776605944392)]
I have a dataframe called df
and want to create a list of tuples inside tuple like the one shown below.
dataframe:
Expected output:
[(('AK', 'Alaska Bible College'), 53.30776605944392)]
A simple answer to this would be:
output = list((x for x in zip(zip(df['STABBR'], df['INSTNM']), df['PCT_CHANGE'] * 100)))