I have a pandas dataframe that I need to pull specific rows out of and into a new dataframe. These rows are in a list that look something like this:[42 50 52 59 60 62]
I am creating the dataframe from a .csv file but as far as I can tell there is not a way to designate the row numbers when reading the .csv and creating the dataframe.
import pandas as pd
df = pd.read_csv('/Users/uni/Desktop/corrindex+id/rt35',index_col = False, header = None )
Here's a portion of the dataframe:
0
0 1 269 245 44 5
1 2 293 393 33 5
2 3 295 175 67 12
3 4 298 415 33 5
4 5 304 392 213 11