title: Create a copy of a dataframe from selected rows
body: <p>I am trying to create a new dataframe from selected rows of another dataframe</p>
  <pre><code>TestData = pd.read_csv('Aptitude_Classification_data.csv')
  TeamC = ['Synonyms and Antonyms', 'Time and Work', 'Permutations and Combinations', 'LCM and HCF', 'Profit and Loss']
  SelectedData = pd.DataFrame(TestData[TestData['Sub-Category'].isin(TeamC)])
  pd.unique(SelectedData['Sub-Category'])
  SelectedData.head()
  </code></pre>
  <p>Code and output:</p>
  <p><a href="https://i.stack.imgur.com/EFpdb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EFpdb.png" alt="enter image description here" /></a></p>
  <p>I want the new dataframe as a copy with all the data and index starting from 1 and without any breaks</p>