1

I have a dataframe called df and want to create a list of tuples inside tuple like the one shown below.

dataframe:

enter image description here

Expected output:

[(('AK', 'Alaska Bible College'), 53.30776605944392)]
It_is_Chris
  • 11,310
  • 2
  • 21
  • 36
pandads68
  • 27
  • 6

1 Answers1

0

A simple answer to this would be:

output = list((x for x in zip(zip(df['STABBR'], df['INSTNM']), df['PCT_CHANGE'] * 100)))
A.M. Ducu
  • 881
  • 6
  • 19