Creating a new Dataframe with specific row numbers from another I've found other posts that refer to creating a new dataframe using specific conditions from another (like ID = 27, etc.) but nothing that allows me to make a new dataframe from specific row numbers of another.
Here is what I have tried so far:
To add a single row to a new dataframe:
test.append(original.loc[300])
test

To add a list of rows to a new dataframe:
entries_to_move = [10, 20, 30]
for i in entries_to_move:
   test.append(original.loc[i])
test

Neither method works, so help would be appreciated. The output for either code is just a __.
Thank you!
So, your question is to instantiate a new data frame df2 from another data frame df1, by simply selecting rows.
You can do this by indexing. What is great by pandas DataFrames is that you can index a DataFrame using a list of indices.
df2 = df1.iloc[[list of indices],:]