In my .csv file, I have 32 rows, but I only want it to return 10 rows out of those 32. So if I want to return rows 2, 7, 12, 13, 14, 17, 27, 29, 30, 32, how would I go about doing that?
I have:
read_poem_data = pd.read_csv('poem_data.csv')
print(read_poem_data.loc[2:3])
but this is only printing lines 2 and 3 of my file, when i want it to print 10 specific lines remove all the other lines from my .csv file.
read_poem_data.loc[[(line-1) for line in [2, 7, 12, 13, 14, 17, 27, 29, 30, 32]]](because row #1 has the index of 0, etc.)