title: Pandas create new row based on a given cell value
body: <p>What I want to achieve is that based on the column page..if there is more than one value i.e 10,40 the script should create a new row using one of the value for example in this case 40 with all the other data  from other columns retained. I am trying to achieve this by checking for commas.
  i.e each row should have one value under page column and if more than one create a new row that will have the other value with the data from other columns retained in the new row.</p>
  <pre><code>    page=filedata['Page']
      for i in page:
          if ',' in str(i):
              row=filedata.loc[filedata['Page'] == i]
              splitted_pages=i.split(',')
              first_page=splitted_pages[0]
              second_page=splitted_pages[1]
              old_page=first_page
              new_page=second_page
              filedata.append(row)
              final_filename=&quot;generated&quot;+str(formatted_date)+&quot;.xlsx&quot;
              final_filepath=r&quot;C:\Users\wonchuru\Desktop\reports&quot;
              final_joined_path = os.path.join(final_filepath, final_filename)
              filedata.to_excel(final_joined_path)
          else:
              pass
  </code></pre>