title: Python read from txt to csv with duplicate values
body: <p>I got text file and my text file includes infos about department and managers
  Example part from txt : </p>
  
  <pre><code>department: sale
  group : building a 
  manager::sergey
  
  department: hr 
  group : building a 
  manager::tom 
  location:somewhereelse
  
  department: health
  group : building b 
  manager::jeniffer 
  manager::billy
  
  department: security 
  group : building b 
  manager::john
  </code></pre>
  
  <p>Between every department there is one empty line after manager name/names. and one space after every info at lines.</p>
  
  <p>Im using df_readcsv and transform that csv for making columns with dep, group , manager,location</p>
  
  <p>There are 2 problems</p>
  
  <p>1- Sometimes there can be 2 manager at dep(like health department) . If there are 2 managers at same department I failed. My code works only for 1 manager. How can add one more column with other manager?</p>
  
  <p>2- Sometimes there are more rows than other rows look at hr department. There is info about location. It makes harder to doing regular df. 
  It needs dynamic structure I suppose :(</p>
  
  <p>Example of What It should be </p>
  
  <pre><code>dep           group             manager     Location
  sale          building a        sergey      ""
  hr            building a        tom          somewhereelse
  health        building b        jeniffer     ""
  health        building b        billy         ""
  </code></pre>
  
  <p>What can I do ? </p>
  
  <p>My code </p>
  
  <pre><code>df = pd.read_csv('sample.txt', sep="\n")
  df = data.replace({ '# department: ' : " ", '# group:' : " ",'# manager:' : " ",}, regex= True)
  ab = pd.DataFrame(df.values.reshape(-1, 7), 
                      columns=["department","group","manager"])
  </code></pre>