A great use of ChatGPT is to post in a command line output of your data then ask it how to do something. I just posted in df.head() from pandas asked it how to output an array by a unique column value and it provided the code to do it!